Skip to content

Commit

Permalink
explain why __rust_start_panic does not take a Box
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Nov 26, 2019
1 parent 61486f4 commit 4a19ef9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libstd/panicking.rs
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4a19ef9

Please sign in to comment.