interpret/miri: call panic_cannot_unwind lang item instead of hard-coding the same message

This commit is contained in:
Ralf Jung
2023-08-19 13:21:41 +02:00
parent 818ec8e23a
commit 788fd44a3b
14 changed files with 147 additions and 42 deletions

View File

@@ -197,8 +197,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
}
UnwindTerminate => {
// FIXME: maybe should call `panic_no_unwind` lang item instead.
M::abort(self, "panic in a function that cannot unwind".to_owned())?;
M::unwind_terminate(self)?;
}
// When we encounter Resume, we've finished unwinding