Skip to content

Commit e29b5ba

Browse files
committed
Fix mir interp of TerminatorKind::Terminate
1 parent 5ae3a53 commit e29b5ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_const_eval/src/interpret/terminator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
145145
}
146146

147147
Terminate => {
148-
M::abort(self, "the program aborted execution".to_owned())?;
148+
// FIXME: maybe should call `panic_no_unwind` lang item instead.
149+
M::abort(self, "panic in a function that cannot unwind".to_owned())?;
149150
}
150151

151152
// When we encounter Resume, we've finished unwinding

0 commit comments

Comments
 (0)