We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65da4ad commit 73303c3Copy full SHA for 73303c3
compiler/rustc_ast/src/token.rs
@@ -909,7 +909,7 @@ impl NonterminalKind {
909
},
910
sym::pat_param => NonterminalKind::PatParam { inferred: false },
911
sym::expr => NonterminalKind::Expr,
912
- sym::expr_2021 if edition() >= Edition::Edition2024 => NonterminalKind::Expr2021,
+ sym::expr_2021 if edition() >= Edition::Edition2021 => NonterminalKind::Expr2021,
913
sym::ty => NonterminalKind::Ty,
914
sym::ident => NonterminalKind::Ident,
915
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