diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2022-02-23 08:24:20 -0500 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2022-02-25 08:00:53 -0500 |
| commit | 3c62f2f635c7379bcdcf64e4efa5ffe4ecb0ba6d (patch) | |
| tree | 78f3d66bd5548ccbe6e5ba589eb578db27dd85ec | |
| parent | 76b13c9eeaa3bf814ff4559eafff235a892d213b (diff) | |
| download | rust-3c62f2f635c7379bcdcf64e4efa5ffe4ecb0ba6d.tar.gz rust-3c62f2f635c7379bcdcf64e4efa5ffe4ecb0ba6d.zip | |
Re-add track_caller to panic_no_unwind in bootstrap
This function was updated in a recent PR (92911) to be called without the caller information passed in, but the function signature itself was not altered with cfg_attr at the time.
| -rw-r--r-- | library/core/src/panicking.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/core/src/panicking.rs b/library/core/src/panicking.rs index 91458a4ca2a..89cebaa653f 100644 --- a/library/core/src/panicking.rs +++ b/library/core/src/panicking.rs @@ -84,8 +84,11 @@ fn panic_bounds_check(index: usize, len: usize) -> ! { panic!("index out of bounds: the len is {} but the index is {}", len, index) } +// This function is called directly by the codegen backend, and must not have +// any extra arguments (including those synthesized by track_caller). #[cold] #[inline(never)] +#[cfg_attr(bootstrap, track_caller)] #[lang = "panic_no_unwind"] // needed by codegen for panic in nounwind function fn panic_no_unwind() -> ! { if cfg!(feature = "panic_immediate_abort") { |
