1
Fork 0

Add UnwindAction::Terminate

This commit is contained in:
Gary Guo 2022-10-10 22:40:40 +01:00
parent 5e6ed132fa
commit 0a5dac3062
16 changed files with 126 additions and 121 deletions

View file

@ -736,6 +736,9 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
mir::UnwindAction::Unreachable => {
throw_ub_format!("unwinding past a stack frame that does not allow unwinding")
}
mir::UnwindAction::Terminate => {
M::abort(self, "panic in a function that cannot unwind".to_owned())?;
}
};
Ok(())
}