Skip to content
Permalink
Browse files

explain why __rust_start_panic does not take a Box

  • Loading branch information
RalfJung committed Nov 26, 2019
1 parent 61486f4 commit 4a19ef938c3670afb8cc278d3d31a803b19addab
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/libstd/panicking.rs
@@ -47,6 +47,8 @@ extern {
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;
}

0 comments on commit 4a19ef9

Please sign in to comment.
You can’t perform that action at this time.