File tree 2 files changed +3
-3
lines changed
compiler/rustc_builtin_macros/src
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,11 @@ pub fn expand_assert<'cx>(
29
29
30
30
let panic_call = if let Some ( tokens) = custom_message {
31
31
let path = if span. rust_2021 ( ) {
32
- // On edition 2021, we always call `$crate::panic!()`.
32
+ // On edition 2021, we always call `$crate::panic::panic_2021 !()`.
33
33
Path {
34
34
span : sp,
35
35
segments : cx
36
- . std_path ( & [ sym:: panic] )
36
+ . std_path ( & [ sym:: panic, sym :: panic_2021 ] )
37
37
. into_iter ( )
38
38
. map ( |ident| PathSegment :: from_ident ( ident) )
39
39
. collect ( ) ,
Original file line number Diff line number Diff line change @@ -1234,7 +1234,7 @@ pub(crate) mod builtin {
1234
1234
#[ rustc_builtin_macro]
1235
1235
#[ macro_export]
1236
1236
#[ rustc_diagnostic_item = "assert_macro" ]
1237
- #[ allow_internal_unstable( core_panic) ]
1237
+ #[ allow_internal_unstable( core_panic, edition_panic ) ]
1238
1238
macro_rules! assert {
1239
1239
( $cond: expr $( , ) ?) => { { /* compiler built-in */ } } ;
1240
1240
( $cond: expr, $( $arg: tt) +) => { { /* compiler built-in */ } } ;
You can’t perform that action at this time.
0 commit comments