Skip to content

Commit babe9fc

Browse files
committed
rename update_count_then_panic -> rust_panic_without_hook
1 parent 4a19ef9 commit babe9fc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/libstd/panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -425,5 +425,5 @@ pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
425425
/// ```
426426
#[stable(feature = "resume_unwind", since = "1.9.0")]
427427
pub fn resume_unwind(payload: Box<dyn Any + Send>) -> ! {
428-
panicking::update_count_then_panic(payload)
428+
panicking::rust_panic_without_hook(payload)
429429
}

src/libstd/panicking.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,9 @@ fn rust_panic_with_hook(payload: &mut dyn BoxMeUp,
491491
rust_panic(payload)
492492
}
493493

494-
/// Shim around rust_panic. Called by resume_unwind.
495-
pub fn update_count_then_panic(msg: Box<dyn Any + Send>) -> ! {
494+
/// This is the entry point for `resume_unwind`.
495+
/// It just forwards the payload to the panic runtime.
496+
pub fn rust_panic_without_hook(payload: Box<dyn Any + Send>) -> ! {
496497
update_panic_count(1);
497498

498499
struct RewrapBox(Box<dyn Any + Send>);
@@ -507,7 +508,7 @@ pub fn update_count_then_panic(msg: Box<dyn Any + Send>) -> ! {
507508
}
508509
}
509510

510-
rust_panic(&mut RewrapBox(msg))
511+
rust_panic(&mut RewrapBox(payload))
511512
}
512513

513514
/// An unmangled function (through `rustc_std_internal_symbol`) on which to slap

0 commit comments

Comments
 (0)