]> git.lizzy.rs Git - rust.git/commitdiff
explain why __rust_start_panic does not take a Box
authorRalf Jung <post@ralfj.de>
Tue, 26 Nov 2019 08:29:39 +0000 (09:29 +0100)
committerRalf Jung <post@ralfj.de>
Tue, 26 Nov 2019 08:29:39 +0000 (09:29 +0100)
src/libstd/panicking.rs

index 8f9a4c05b5702fb43283cea0daafedcdb9096464..e0d980fc306b550ea05728106fda0d10f47a6765 100644 (file)
@@ -47,6 +47,8 @@ fn __rust_maybe_catch_panic(f: fn(*mut u8),
                                 vtable_ptr: *mut usize) -> u32;
 
     /// `payload` is actually a `*mut &mut dyn BoxMeUp` but that would cause FFI warnings.
+    /// It cannot be `Box<dyn BoxMeUp>` because the other end of this call does not depend
+    /// on liballoc, and thus cannot use `Box`.
     #[unwind(allowed)]
     fn __rust_start_panic(payload: usize) -> u32;
 }