diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2019-11-25 15:05:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-25 15:05:26 +0100 |
| commit | 30599d765b1474eb93598f57a6fcd790a98be2db (patch) | |
| tree | 69c7372aebea99d9ed44eef75a1241022319d2e1 /src/libstd | |
| parent | 11b8e166e852a0a326a0aca97d4a296f533466e0 (diff) | |
| parent | 6440b9425384d2f8f11c4fe281fe99f79b92afb6 (diff) | |
| download | rust-30599d765b1474eb93598f57a6fcd790a98be2db.tar.gz rust-30599d765b1474eb93598f57a6fcd790a98be2db.zip | |
Rollup merge of #66694 - RalfJung:panic-comments, r=Dylan-DPC
Add some comments to panic runtime
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/panicking.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index f76969146fd..6819a4a04d7 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -44,6 +44,8 @@ extern { data: *mut u8, data_ptr: *mut usize, vtable_ptr: *mut usize) -> u32; + + /// `payload` is actually a `*mut &mut dyn BoxMeUp` but that would cause FFI warnings. #[unwind(allowed)] fn __rust_start_panic(payload: usize) -> u32; } @@ -294,7 +296,7 @@ pub fn panicking() -> bool { update_panic_count(0) != 0 } -/// Entry point of panic from the libcore crate. +/// Entry point of panic from the libcore crate (`panic_impl` lang item). #[cfg(not(test))] #[panic_handler] #[unwind(allowed)] @@ -380,7 +382,7 @@ fn continue_panic_fmt(info: &PanicInfo<'_>) -> ! { #[unstable(feature = "libstd_sys_internals", reason = "used by the panic! macro", issue = "0")] -#[cfg_attr(not(test), lang = "begin_panic")] +#[cfg_attr(not(test), lang = "begin_panic")] // lang item for CTFE panic support // never inline unless panic_immediate_abort to avoid code // bloat at the call sites as much as possible #[cfg_attr(not(feature="panic_immediate_abort"),inline(never))] |
