Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 2178615

Browse files
committed
Revert "expr_2021 should be allowed on edition 2021 and later"
This reverts commit 73303c3.
1 parent 26d84db commit 2178615

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_ast/src/token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ impl NonterminalKind {
912912
},
913913
sym::pat_param => NonterminalKind::PatParam { inferred: false },
914914
sym::expr => NonterminalKind::Expr,
915-
sym::expr_2021 if edition() >= Edition::Edition2021 => NonterminalKind::Expr2021,
915+
sym::expr_2021 if edition() >= Edition::Edition2024 => NonterminalKind::Expr2021,
916916
sym::ty => NonterminalKind::Ty,
917917
sym::ident => NonterminalKind::Ident,
918918
sym::lifetime => NonterminalKind::Lifetime,

tests/ui/macros/expr_2021_old_edition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ compile-flags: --edition=2018
1+
//@ compile-flags: --edition=2021
22

33
// This test ensures that expr_2021 is not allowed on pre-2024 editions
44

0 commit comments

Comments
 (0)