rust/library/core
Matthias Krüger 72e8fb4268
Rollup merge of #123050 - RalfJung:panic_str, r=m-ou-se
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.
2024-04-23 12:10:25 +02:00
..
benches Rollup merge of #115913 - FedericoStra:checked_ilog, r=the8472 2024-04-22 20:25:58 +02:00
src Rollup merge of #123050 - RalfJung:panic_str, r=m-ou-se 2024-04-23 12:10:25 +02:00
tests Rollup merge of #124230 - reitermarkus:generic-nonzero-stable, r=dtolnay 2024-04-22 20:26:00 +02:00
Cargo.toml Import the 2021 prelude in the core crate 2024-03-25 13:12:06 -07:00