about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/assert.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_builtin_macros/src/assert.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/assert.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_builtin_macros/src/assert.rs b/compiler/rustc_builtin_macros/src/assert.rs
index f82269c4eee..93ba54da342 100644
--- a/compiler/rustc_builtin_macros/src/assert.rs
+++ b/compiler/rustc_builtin_macros/src/assert.rs
@@ -29,11 +29,11 @@ pub fn expand_assert<'cx>(
 
     let panic_call = if let Some(tokens) = custom_message {
         let path = if span.rust_2021() {
-            // On edition 2021, we always call `$crate::panic!()`.
+            // On edition 2021, we always call `$crate::panic::panic_2021!()`.
             Path {
                 span: sp,
                 segments: cx
-                    .std_path(&[sym::panic])
+                    .std_path(&[sym::panic, sym::panic_2021])
                     .into_iter()
                     .map(|ident| PathSegment::from_ident(ident))
                     .collect(),