Skip to content

Commit 2443f64

Browse files
committed
CTFE: tweak abort-on-uninhabited message
1 parent 80cc2ec commit 2443f64

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

compiler/rustc_mir/src/interpret/intrinsics.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,13 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
414414
if layout.abi.is_uninhabited() {
415415
// The run-time intrinsic panics just to get a good backtrace; here we abort
416416
// since there is no problem showing a backtrace even for aborts.
417-
M::abort(self, format!("attempted to instantiate uninhabited type `{}`", ty))?;
417+
M::abort(
418+
self,
419+
format!(
420+
"aborted execution: attempted to instantiate uninhabited type `{}`",
421+
ty
422+
),
423+
)?;
418424
}
419425
}
420426
sym::simd_insert => {

0 commit comments

Comments
 (0)