@@ -654,29 +654,35 @@ fn codegen_regular_intrinsic_call<'tcx>(
654
654
assert_inhabited | assert_zero_valid | assert_uninit_valid, ( ) {
655
655
let layout = fx. layout_of( substs. type_at( 0 ) ) ;
656
656
if layout. abi. is_uninhabited( ) {
657
- with_no_trimmed_paths( || crate :: base:: codegen_panic(
658
- fx,
659
- & format!( "attempted to instantiate uninhabited type `{}`" , layout. ty) ,
660
- span,
661
- ) ) ;
657
+ with_no_trimmed_paths!( {
658
+ crate :: base:: codegen_panic(
659
+ fx,
660
+ & format!( "attempted to instantiate uninhabited type `{}`" , layout. ty) ,
661
+ span,
662
+ )
663
+ } ) ;
662
664
return ;
663
665
}
664
666
665
667
if intrinsic == sym:: assert_zero_valid && !layout. might_permit_raw_init( fx, /*zero:*/ true ) {
666
- with_no_trimmed_paths( || crate :: base:: codegen_panic(
667
- fx,
668
- & format!( "attempted to zero-initialize type `{}`, which is invalid" , layout. ty) ,
669
- span,
670
- ) ) ;
668
+ with_no_trimmed_paths!( {
669
+ crate :: base:: codegen_panic(
670
+ fx,
671
+ & format!( "attempted to zero-initialize type `{}`, which is invalid" , layout. ty) ,
672
+ span,
673
+ ) ;
674
+ } ) ;
671
675
return ;
672
676
}
673
677
674
678
if intrinsic == sym:: assert_uninit_valid && !layout. might_permit_raw_init( fx, /*zero:*/ false ) {
675
- with_no_trimmed_paths( || crate :: base:: codegen_panic(
676
- fx,
677
- & format!( "attempted to leave type `{}` uninitialized, which is invalid" , layout. ty) ,
678
- span,
679
- ) ) ;
679
+ with_no_trimmed_paths!( {
680
+ crate :: base:: codegen_panic(
681
+ fx,
682
+ & format!( "attempted to leave type `{}` uninitialized, which is invalid" , layout. ty) ,
683
+ span,
684
+ )
685
+ } ) ;
680
686
return ;
681
687
}
682
688
} ;
0 commit comments