@@ -654,29 +654,35 @@ fn codegen_regular_intrinsic_call<'tcx>(
654654 assert_inhabited | assert_zero_valid | assert_uninit_valid, ( ) {
655655 let layout = fx. layout_of( substs. type_at( 0 ) ) ;
656656 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+ } ) ;
662664 return ;
663665 }
664666
665667 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+ } ) ;
671675 return ;
672676 }
673677
674678 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+ } ) ;
680686 return ;
681687 }
682688 } ;
0 commit comments