1
Fork 0

Revert "Rename -Zoom=panic to -Zoom=unwind"

This reverts commit 4b981c2648.
This commit is contained in:
Matthias Krüger 2023-04-25 00:08:33 +02:00
parent 653cfdb436
commit 33253fa6a4
5 changed files with 8 additions and 8 deletions

View file

@ -3048,9 +3048,9 @@ pub(crate) mod dep_tracking {
#[derive(Clone, Copy, PartialEq, Hash, Debug, Encodable, Decodable, HashStable_Generic)]
pub enum OomStrategy {
/// Generate a panic that can be caught by `catch_unwind`.
Unwind,
Panic,
/// Calls the panic hook as normal but aborts instead of unwinding.
/// Abort the process immediately.
Abort,
}
@ -3059,7 +3059,7 @@ impl OomStrategy {
pub fn should_panic(self) -> u8 {
match self {
OomStrategy::Unwind => 1,
OomStrategy::Panic => 1,
OomStrategy::Abort => 0,
}
}

View file

@ -662,7 +662,7 @@ mod parse {
pub(crate) fn parse_oom_strategy(slot: &mut OomStrategy, v: Option<&str>) -> bool {
match v {
Some("unwind") => *slot = OomStrategy::Unwind,
Some("panic") => *slot = OomStrategy::Panic,
Some("abort") => *slot = OomStrategy::Abort,
_ => return false,
}