fn emit_mir_rvalue_uninterned(
        &mut self,
        mir: &'gcx mir::Rvalue<'gcx>,
        mode_hint: Mode,
    ) -> Result<(HybridValue, Mode)> {
        let result = self.emit_mir_rvalue_inner(mir, mode_hint);
        match result {
            Ok((result, actual_mode)) => {
                let llty_exp = self.emit_type(mir.ty)?;
                let llty_exp = match actual_mode {
                    Mode::Value => llty_exp,
                    Mode::Signal => llhd::signal_ty(llty_exp),
                };
                let llty_act = self.llhd_type(result.0);
                assert_span!(
                    llty_exp == llty_act,
                    mir.span,
                    self.cx,
                    "codegen for MIR rvalue `{}` should produce `{}`, but got `{}`; {:#?}",
                    mir.span.extract(),
                    llty_exp,
                    llty_act,
                    mir
                );
            }
            Err(()) => (),
        }
        result
    }
/// Emit the code for an MIR rvalue.
///
/// Wrapper around `emit_mir_rvalue_inner` that asserts the LLHD type of the
/// result matches expectations.
Emit the code for an MIR rvalue.
Wrapper around `emit_mir_rvalue_inner` that asserts the LLHD type of the
result matches expectations.
Emit the code for an MIR rvalue . Wrapper around ` emit_mir_rvalue_inner ` that asserts the LLHD type of the result matches expectations .
fn emit_mir_rvalue_uninterned(
        &mut self,
        mir: &'gcx mir::Rvalue<'gcx>,
        mode_hint: Mode,
    ) -> Result<(HybridValue, Mode)> {
        let result = self.emit_mir_rvalue_inner(mir, mode_hint);
        match result {
            Ok((result, actual_mode)) => {
                let llty_exp = self.emit_type(mir.ty)?;
                let llty_exp = match actual_mode {
                    Mode::Value => llty_exp,
                    Mode::Signal => llhd::signal_ty(llty_exp),
                };
                let llty_act = self.llhd_type(result.0);
                assert_span!(
                    llty_exp == llty_act,
                    mir.span,
                    self.cx,
                    "codegen for MIR rvalue `{}` should produce `{}`, but got `{}`; {:#?}",
                    mir.span.extract(),
                    llty_exp,
                    llty_act,
                    mir
                );
            }
            Err(()) => (),
        }
        result
    }
fn emit_mir_rvalue_uninterned ( & mut self , mir : & ' gcx mir :: Rvalue < ' gcx > , mode_hint : Mode , ) -> Result < ( HybridValue , Mode ) > { let result = self . emit_mir_rvalue_inner ( mir , mode_hint ) ; match result { Ok ( ( result , actual_mode ) ) => { let llty_exp = self . emit_type ( mir . ty ) ? ; let llty_exp = match actual_mode { Mode :: Value => llty_exp , Mode :: Signal => llhd :: signal_ty ( llty_exp ) , } ; let llty_act = self . llhd_type ( result . 0 ) ; assert_span ! ( llty_exp llty_act mir span self cx " " mir span extract ( ) llty_exp llty_act mir ) ; } Err ( ( ) ) => ( ) , } result }
Emit the code for an MIR rvalue.
Emit the code for an MIR rvalue .
&mut self
mir
&'gcx mir::Rvalue<'gcx>
mode_hint
Mode
&mut self
mir
&'gcx mir::Rvalue<'gcx>
mode_hint
Mode