Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/hir_expand/src/builtin_fn_macro.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_expand/src/builtin_fn_macro.rs b/crates/hir_expand/src/builtin_fn_macro.rs
index 17f0caca7a..da76b6b080 100644
--- a/crates/hir_expand/src/builtin_fn_macro.rs
+++ b/crates/hir_expand/src/builtin_fn_macro.rs
@@ -344,7 +344,7 @@ fn panic_expand(
let loc: MacroCallLoc = db.lookup_intern_macro_call(id);
// Expand to a macro call `$crate::panic::panic_{edition}`
let krate = tt::Ident { text: "$crate".into(), id: tt::TokenId::unspecified() };
- let mut call = if db.crate_graph()[loc.krate].edition == Edition::Edition2021 {
+ let mut call = if db.crate_graph()[loc.krate].edition >= Edition::Edition2021 {
quote!(#krate::panic::panic_2021!)
} else {
quote!(#krate::panic::panic_2015!)
@@ -363,7 +363,7 @@ fn unreachable_expand(
let loc: MacroCallLoc = db.lookup_intern_macro_call(id);
// Expand to a macro call `$crate::panic::unreachable_{edition}`
let krate = tt::Ident { text: "$crate".into(), id: tt::TokenId::unspecified() };
- let mut call = if db.crate_graph()[loc.krate].edition == Edition::Edition2021 {
+ let mut call = if db.crate_graph()[loc.krate].edition >= Edition::Edition2021 {
quote!(#krate::panic::unreachable_2021!)
} else {
quote!(#krate::panic::unreachable_2015!)