Skip to content

Commit 4b981c2

Browse files
committed
Rename -Zoom=panic to -Zoom=unwind
1 parent abc0660 commit 4b981c2

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

Diff for: compiler/rustc_interface/src/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ fn test_unstable_options_tracking_hash() {
776776
tracked!(no_link, true);
777777
tracked!(no_profiler_runtime, true);
778778
tracked!(no_unique_section_names, true);
779-
tracked!(oom, OomStrategy::Panic);
779+
tracked!(oom, OomStrategy::Unwind);
780780
tracked!(osx_rpath_install_name, true);
781781
tracked!(packed_bundled_libs, true);
782782
tracked!(panic_abort_tests, true);

Diff for: compiler/rustc_session/src/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3048,9 +3048,9 @@ pub(crate) mod dep_tracking {
30483048
#[derive(Clone, Copy, PartialEq, Hash, Debug, Encodable, Decodable, HashStable_Generic)]
30493049
pub enum OomStrategy {
30503050
/// Generate a panic that can be caught by `catch_unwind`.
3051-
Panic,
3051+
Unwind,
30523052

3053-
/// Abort the process immediately.
3053+
/// Calls the panic hook as normal but aborts instead of unwinding.
30543054
Abort,
30553055
}
30563056

@@ -3059,7 +3059,7 @@ impl OomStrategy {
30593059

30603060
pub fn should_panic(self) -> u8 {
30613061
match self {
3062-
OomStrategy::Panic => 1,
3062+
OomStrategy::Unwind => 1,
30633063
OomStrategy::Abort => 0,
30643064
}
30653065
}

Diff for: compiler/rustc_session/src/options.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ mod parse {
662662

663663
pub(crate) fn parse_oom_strategy(slot: &mut OomStrategy, v: Option<&str>) -> bool {
664664
match v {
665-
Some("panic") => *slot = OomStrategy::Panic,
665+
Some("unwind") => *slot = OomStrategy::Unwind,
666666
Some("abort") => *slot = OomStrategy::Abort,
667667
_ => return false,
668668
}

Diff for: library/alloc/src/alloc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ fn rust_oom(layout: Layout) -> ! {
398398
fn panic_impl(pi: &core::panic::PanicInfo<'_>) -> !;
399399

400400
// This symbol is emitted by rustc .
401-
// Its value depends on the -Zoom={panic,abort} compiler option.
401+
// Its value depends on the -Zoom={unwind,abort} compiler option.
402402
static __rust_alloc_error_handler_should_panic: u8;
403403
}
404404

@@ -458,7 +458,7 @@ pub mod __alloc_error_handler {
458458
pub unsafe fn __rdl_oom(size: usize, _align: usize) -> ! {
459459
extern "Rust" {
460460
// This symbol is emitted by rustc next to __rust_alloc_error_handler.
461-
// Its value depends on the -Zoom={panic,abort} compiler option.
461+
// Its value depends on the -Zoom={unwind,abort} compiler option.
462462
static __rust_alloc_error_handler_should_panic: u8;
463463
}
464464

Diff for: tests/ui/oom_unwind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z oom=panic
1+
// compile-flags: -Z oom=unwind
22
// run-pass
33
// no-prefer-dynamic
44
// needs-unwind

0 commit comments

Comments
 (0)