diff options
| author | Ralf Jung <post@ralfj.de> | 2019-11-24 11:26:07 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-11-24 11:26:07 +0100 |
| commit | 35ee6bd59b20954bfee4e8c02ea16fedb6faca04 (patch) | |
| tree | aa411bae5dbd0dc97741e05e99d277a352ee90cd /src/libcore | |
| parent | e41ced3f8d8e2f3f377ef931458e612d5f3d1f3f (diff) | |
| download | rust-35ee6bd59b20954bfee4e8c02ea16fedb6faca04.tar.gz rust-35ee6bd59b20954bfee4e8c02ea16fedb6faca04.zip | |
panicking comments
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/panicking.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/panicking.rs b/src/libcore/panicking.rs index 8a6ab99c65a..9940303ff32 100644 --- a/src/libcore/panicking.rs +++ b/src/libcore/panicking.rs @@ -7,7 +7,7 @@ //! //! ``` //! # use std::fmt; -//! fn panic_impl(fmt: fmt::Arguments, file_line_col: &(&'static str, u32, u32)) -> ! +//! fn panic_impl(pi: &PanicInfo<'_>) -> ! //! # { loop {} } //! ``` //! @@ -35,7 +35,7 @@ use crate::panic::{Location, PanicInfo}; // 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))] -#[lang = "panic"] +#[lang = "panic"] // needed by codegen for panic on overflow and other `Assert` MIR terminators pub fn panic(expr: &str, location: &Location<'_>) -> ! { if cfg!(feature = "panic_immediate_abort") { unsafe { super::intrinsics::abort() } @@ -52,7 +52,7 @@ pub fn panic(expr: &str, location: &Location<'_>) -> ! { #[cold] #[cfg_attr(not(feature="panic_immediate_abort"),inline(never))] -#[lang = "panic_bounds_check"] +#[lang = "panic_bounds_check"] // needed by codegen for panic on OOB array/slice access fn panic_bounds_check(location: &Location<'_>, index: usize, len: usize) -> ! { if cfg!(feature = "panic_immediate_abort") { unsafe { super::intrinsics::abort() } |
