@@ -779,29 +779,35 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
779
779
assert_inhabited | assert_zero_valid | assert_uninit_valid, <T> () {
780
780
let layout = fx.layout_of(T);
781
781
if layout.abi.is_uninhabited() {
782
- with_no_trimmed_paths(|| crate::base::codegen_panic(
783
- fx,
784
- &format!("attempted to instantiate uninhabited type `{}`", T),
785
- span,
786
- ));
782
+ with_no_trimmed_paths!({
783
+ crate::base::codegen_panic(
784
+ fx,
785
+ &format!("attempted to instantiate uninhabited type `{}`", T),
786
+ span,
787
+ )
788
+ });
787
789
return;
788
790
}
789
791
790
792
if intrinsic == sym::assert_zero_valid && !layout.might_permit_raw_init(fx, /*zero:*/ true) {
791
- with_no_trimmed_paths(|| crate::base::codegen_panic(
792
- fx,
793
- &format!("attempted to zero-initialize type `{}`, which is invalid", T),
794
- span,
795
- ));
793
+ with_no_trimmed_paths!({
794
+ crate::base::codegen_panic(
795
+ fx,
796
+ &format!("attempted to zero-initialize type `{}`, which is invalid", T),
797
+ span,
798
+ );
799
+ });
796
800
return;
797
801
}
798
802
799
803
if intrinsic == sym::assert_uninit_valid && !layout.might_permit_raw_init(fx, /*zero:*/ false) {
800
- with_no_trimmed_paths(|| crate::base::codegen_panic(
801
- fx,
802
- &format!("attempted to leave type `{}` uninitialized, which is invalid", T),
803
- span,
804
- ));
804
+ with_no_trimmed_paths!({
805
+ crate::base::codegen_panic(
806
+ fx,
807
+ &format!("attempted to leave type `{}` uninitialized, which is invalid", T),
808
+ span,
809
+ )
810
+ });
805
811
return;
806
812
}
807
813
};
0 commit comments