Skip to content

Commit

Permalink
Auto merge of rust-lang#132662 - RalfJung:const-panic-inlining, r=<try>
Browse files Browse the repository at this point in the history
tweak attributes for const panic macro

Let's do some random mutations of this macro to see if that can re-gain the perf lost in rust-lang#132542.
  • Loading branch information
bors committed Nov 5, 2024
2 parents e8c698b + 9178693 commit 2c56f19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub macro const_panic {
// add the `rustc_allow_const_fn_unstable`. This is okay to do
// because both variants will panic, just with different messages.
#[rustc_allow_const_fn_unstable(const_eval_select)]
#[inline(always)]
#[inline]
#[track_caller]
#[cfg_attr(bootstrap, rustc_const_stable(feature = "const_panic", since = "CURRENT_RUSTC_VERSION"))]
const fn do_panic($($arg: $ty),*) -> ! {
Expand Down

0 comments on commit 2c56f19

Please sign in to comment.