1
Fork 0

Rename -Zoom=panic to -Zoom=unwind

This commit is contained in:
Amanieu d'Antras 2023-03-23 23:39:41 +00:00
parent abc0660118
commit 4b981c2648
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`.
Panic,
Unwind,
/// Abort the process immediately.
/// Calls the panic hook as normal but aborts instead of unwinding.
Abort,
}
@ -3059,7 +3059,7 @@ impl OomStrategy {
pub fn should_panic(self) -> u8 {
match self {
OomStrategy::Panic => 1,
OomStrategy::Unwind => 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("panic") => *slot = OomStrategy::Panic,
Some("unwind") => *slot = OomStrategy::Unwind,
Some("abort") => *slot = OomStrategy::Abort,
_ => return false,
}