pub fn codegen_never_return_intrinsic(
        &mut self,
        instance: Instance<'tcx>,
        span: Option<Span>,
    ) -> Stmt {
        let intrinsic = self.symbol_name(instance);
        let intrinsic = intrinsic.as_str();

        debug!("codegen_never_return_intrinsic:\n\tinstance {:?}\n\tspan {:?}", instance, span);

        match intrinsic {
            "abort" => self.codegen_fatal_error(
                PropertyClass::DefaultAssertion,
                "reached intrinsic::abort",
                span,
            ),
            // Transmuting to an uninhabited type is UB.
            "transmute" => self.codegen_fatal_error(
                PropertyClass::DefaultAssertion,
                "transmuting to uninhabited type has undefined behavior",
                span,
            ),
            _ => self.codegen_fatal_error(
                PropertyClass::UnsupportedConstruct,
                &format!("Unsupported intrinsic {}", intrinsic),
                span,
            ),
        }
    }
/// Handles codegen for non returning intrinsics
/// Non returning intrinsics are not associated with a destination
Handles codegen for non returning intrinsics
Non returning intrinsics are not associated with a destination
Handles codegen for non returning intrinsics Non returning intrinsics are not associated with a destination
pub fn codegen_never_return_intrinsic(
        &mut self,
        instance: Instance<'tcx>,
        span: Option<Span>,
    ) -> Stmt {
        let intrinsic = self.symbol_name(instance);
        let intrinsic = intrinsic.as_str();
        debug!("codegen_never_return_intrinsic:\n\tinstance {:?}\n\tspan {:?}", instance, span);
        match intrinsic {
            "abort" => self.codegen_fatal_error(
                PropertyClass::DefaultAssertion,
                "reached intrinsic::abort",
                span,
            ),
            // Transmuting to an uninhabited type is UB.
            "transmute" => self.codegen_fatal_error(
                PropertyClass::DefaultAssertion,
                "transmuting to uninhabited type has undefined behavior",
                span,
            ),
            _ => self.codegen_fatal_error(
                PropertyClass::UnsupportedConstruct,
                &format!("Unsupported intrinsic {}", intrinsic),
                span,
            ),
        }
    }
pub fn codegen_never_return_intrinsic ( & mut self , instance : Instance < ' tcx > , span : Option < Span > , ) -> Stmt { let intrinsic = self . symbol_name ( instance ) ; let intrinsic = intrinsic . as_str ( ) ; debug ! ( " \n \t \n \t " instance span ) ; match intrinsic { " " => self . codegen_fatal_error ( PropertyClass :: DefaultAssertion , " " , span , ) , // Transmuting to an uninhabited type is UB. " " => self . codegen_fatal_error ( PropertyClass :: DefaultAssertion , " " , span , ) , _ => self . codegen_fatal_error ( PropertyClass :: UnsupportedConstruct , & format ! ( " " intrinsic ) , span , ) , } }
Handles codegen for non returning intrinsics
Non returning intrinsics are not associated with a destination
Handles codegen for non returning intrinsics Non returning intrinsics are not associated with a destination
&mut self
instance
Instance<'tcx>
span
Option<Span>