-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Enable -Z panic-in-drop=abort by default #95209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is used in rustc tests to test -Z panic-in-drop=unwind.
The job Click to see the possible cause of the failure (guessed by this bot)
|
Looks like this causes delay_span_bug to abort the process if it triggers rather than continue unwinding to the main entry point of rustc_driver and return an error value. |
So this seems to be due to the unfortunate design of
|
☔ The latest upstream changes (presumably #96622) made this pull request unmergeable. Please resolve the merge conflicts. |
Closing this as inactive |
This PR switches the default value of
-Z panic-in-drop
toabort
. This causes Rust programs to abort if a panic escapes from aDrop
impl (it is not caught bycatch_unwind
).See rust-lang/lang-team#97 for a more detailed rationale on this change.
Most of the changes in this PR involve fixing tests to work with the new behavior. For now, stdlib tests which rely on panics in drop are simply disabled with
#[ignore]
. However, if in the future we decide to make this change permanent and remove the-Z panic-in-drop=unwind
option then we can simplify the implementation of the collections, especially with regards todrain_filter
.r? @joshtriplett