CTFE: tweak abort-on-uninhabited message

This commit is contained in:
Ralf Jung 2020-12-10 19:42:01 +01:00
parent 80cc2ecf10
commit 2443f642e3

View file

@ -414,7 +414,13 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
if layout.abi.is_uninhabited() {
// The run-time intrinsic panics just to get a good backtrace; here we abort
// since there is no problem showing a backtrace even for aborts.
M::abort(self, format!("attempted to instantiate uninhabited type `{}`", ty))?;
M::abort(
self,
format!(
"aborted execution: attempted to instantiate uninhabited type `{}`",
ty
),
)?;
}
}
sym::simd_insert => {