diff options
| author | Ralf Jung <post@ralfj.de> | 2019-11-26 10:23:15 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-11-26 10:23:15 +0100 |
| commit | babe9fcbc1d5aa5a6a53b7d2e34777cfe28e2c41 (patch) | |
| tree | 9fc1b09d980b601f963373b9ff75c6b1b3a20c91 /src/libstd | |
| parent | 4a19ef938c3670afb8cc278d3d31a803b19addab (diff) | |
| download | rust-babe9fcbc1d5aa5a6a53b7d2e34777cfe28e2c41.tar.gz rust-babe9fcbc1d5aa5a6a53b7d2e34777cfe28e2c41.zip | |
rename update_count_then_panic -> rust_panic_without_hook
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/panic.rs | 2 | ||||
| -rw-r--r-- | src/libstd/panicking.rs | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs index e36496d4c1c..cd024068d2d 100644 --- a/src/libstd/panic.rs +++ b/src/libstd/panic.rs @@ -425,5 +425,5 @@ pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> { /// ``` #[stable(feature = "resume_unwind", since = "1.9.0")] pub fn resume_unwind(payload: Box<dyn Any + Send>) -> ! { - panicking::update_count_then_panic(payload) + panicking::rust_panic_without_hook(payload) } diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index e0d980fc306..c028ddcd676 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -491,8 +491,9 @@ fn rust_panic_with_hook(payload: &mut dyn BoxMeUp, rust_panic(payload) } -/// Shim around rust_panic. Called by resume_unwind. -pub fn update_count_then_panic(msg: Box<dyn Any + Send>) -> ! { +/// This is the entry point for `resume_unwind`. +/// It just forwards the payload to the panic runtime. +pub fn rust_panic_without_hook(payload: Box<dyn Any + Send>) -> ! { update_panic_count(1); struct RewrapBox(Box<dyn Any + Send>); @@ -507,7 +508,7 @@ pub fn update_count_then_panic(msg: Box<dyn Any + Send>) -> ! { } } - rust_panic(&mut RewrapBox(msg)) + rust_panic(&mut RewrapBox(payload)) } /// An unmangled function (through `rustc_std_internal_symbol`) on which to slap |
