mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
72e8fb4268
panic_str only exists for the migration to 2021 panic macros The only caller is `expect_failed`, which is already a cold inline(never) function, so inlining into that function should be fine. (And indeed `panic_str` was `#[inline]` anyway.) The existence of panic_str risks someone calling it when they should call `panic` instead, and I can't see a reason why this footgun should exist. I also extended the comment in `panic` to explain why it needs a `'static` string -- I know I've wondered about this in the past and it took me quite a while to understand. |
||
---|---|---|
.. | ||
alloc | ||
backtrace@e151306182 | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@c0257c1660 | ||
sysroot | ||
test | ||
unwind |