about summary refs log tree commit diff
path: root/compiler/rustc_session/src
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2023-03-23 23:39:41 +0000
committerAmanieu d'Antras <amanieu@gmail.com>2023-04-16 11:50:32 -0700
commit4b981c26487ebe56de6b3000fcd98713804beefc (patch)
treed50840628110d5d096f4dfca8fc8636f8adddae9 /compiler/rustc_session/src
parentabc0660118cc95f47445fd33502a11dd448f5968 (diff)
downloadrust-4b981c26487ebe56de6b3000fcd98713804beefc.tar.gz
rust-4b981c26487ebe56de6b3000fcd98713804beefc.zip
Rename -Zoom=panic to -Zoom=unwind
Diffstat (limited to 'compiler/rustc_session/src')
-rw-r--r--compiler/rustc_session/src/config.rs6
-rw-r--r--compiler/rustc_session/src/options.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index 79eb31bb105..419b6afe7c6 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -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,
         }
     }
diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs
index 631dd0a2146..46c992dfefd 100644
--- a/compiler/rustc_session/src/options.rs
+++ b/compiler/rustc_session/src/options.rs
@@ -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,
         }