File tree 1 file changed +2
-18
lines changed
1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -79,27 +79,11 @@ pub macro panic_2021 {
79
79
#[ cfg( not( feature = "panic_immediate_abort" ) ) ]
80
80
pub macro panic_2021 {
81
81
( ) => ( {
82
- // Create a function so that the argument for `track_caller`
83
- // can be moved inside if possible.
84
- #[ cold]
85
- #[ track_caller]
86
- #[ inline( never) ]
87
- const fn panic_cold_explicit ( ) -> ! {
88
- $crate:: panicking:: panic_explicit ( )
89
- }
90
- panic_cold_explicit ( ) ;
82
+ $crate:: panicking:: panic_explicit ( ) ;
91
83
} ) ,
92
84
// Special-case the single-argument case for const_panic.
93
85
( "{}" , $arg: expr $( , ) ?) => ( {
94
- #[ cold]
95
- #[ track_caller]
96
- #[ inline( never) ]
97
- #[ rustc_const_panic_str] // enforce a &&str argument in const-check and hook this by const-eval
98
- #[ rustc_do_not_const_check] // hooked by const-eval
99
- const fn panic_cold_display < T : $crate:: fmt:: Display > ( arg : & T ) -> ! {
100
- $crate:: panicking:: panic_display ( arg)
101
- }
102
- panic_cold_display ( & $arg) ;
86
+ $crate:: panicking:: panic_display ( & $arg) ;
103
87
} ) ,
104
88
( $( $t: tt) +) => ( {
105
89
// Semicolon to prevent temporaries inside the formatting machinery from
You can’t perform that action at this time.
0 commit comments