]> git.lizzy.rs Git - rust.git/commitdiff
rename update_count_then_panic -> rust_panic_without_hook
authorRalf Jung <post@ralfj.de>
Tue, 26 Nov 2019 09:23:15 +0000 (10:23 +0100)
committerRalf Jung <post@ralfj.de>
Tue, 26 Nov 2019 09:23:15 +0000 (10:23 +0100)
src/libstd/panic.rs
src/libstd/panicking.rs

index e36496d4c1c0d6df9944335c86e1bd36eafe44c9..cd024068d2d47bfeda8c2cb7e43954280c097917 100644 (file)
@@ -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)
 }
index e0d980fc306b550ea05728106fda0d10f47a6765..c028ddcd676fca021d548399a18aaa59bf6a33ce 100644 (file)
@@ -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 @@ fn get(&mut self) -> &(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