We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0777912 commit e0b7d92Copy full SHA for e0b7d92
compiler/rustc_ast/src/token.rs
@@ -907,7 +907,7 @@ impl NonterminalKind {
907
},
908
sym::pat_param => NonterminalKind::PatParam { inferred: false },
909
sym::expr => NonterminalKind::Expr,
910
- sym::expr_2021 if edition() >= Edition::Edition2024 => NonterminalKind::Expr2021,
+ sym::expr_2021 if edition() >= Edition::Edition2021 => NonterminalKind::Expr2021,
911
sym::ty => NonterminalKind::Ty,
912
sym::ident => NonterminalKind::Ident,
913
sym::lifetime => NonterminalKind::Lifetime,
tests/ui/macros/expr_2021_old_edition.rs
@@ -1,4 +1,4 @@
1
-//@ compile-flags: --edition=2021
+//@ compile-flags: --edition=2018
2
3
// This test ensures that expr_2021 is not allowed on pre-2024 editions
4
0 commit comments