1
Fork 0

Change TerminatorKind::Abort to call the panic handler instead of

aborting immediately.

The panic handler is called with a special flag which forces it to abort
after calling the panic hook.
This commit is contained in:
Amanieu d'Antras 2022-01-12 20:45:31 +00:00
parent 528c4f9158
commit fe9dc6e62a
6 changed files with 60 additions and 6 deletions

View file

@ -283,6 +283,7 @@ language_item_table! {
PanicInfo, sym::panic_info, panic_info, Target::Struct, GenericRequirement::None;
PanicLocation, sym::panic_location, panic_location, Target::Struct, GenericRequirement::None;
PanicImpl, sym::panic_impl, panic_impl, Target::Fn, GenericRequirement::None;
PanicNoUnwind, sym::panic_no_unwind, panic_no_unwind, Target::Fn, GenericRequirement::Exact(0);
/// libstd panic entry point. Necessary for const eval to be able to catch it
BeginPanic, sym::begin_panic, begin_panic_fn, Target::Fn, GenericRequirement::None;