expr_2021 should be allowed on edition 2021 and later

This commit is contained in:
Eric Holk 2024-04-16 10:31:21 -07:00
parent 65da4adfcd
commit 73303c3b45
No known key found for this signature in database
GPG Key ID: 8EA6B43ED4CE0911
2 changed files with 2 additions and 2 deletions

View File

@ -909,7 +909,7 @@ pub fn from_symbol(
}, },
sym::pat_param => NonterminalKind::PatParam { inferred: false }, sym::pat_param => NonterminalKind::PatParam { inferred: false },
sym::expr => NonterminalKind::Expr, sym::expr => NonterminalKind::Expr,
sym::expr_2021 if edition() >= Edition::Edition2024 => NonterminalKind::Expr2021, sym::expr_2021 if edition() >= Edition::Edition2021 => NonterminalKind::Expr2021,
sym::ty => NonterminalKind::Ty, sym::ty => NonterminalKind::Ty,
sym::ident => NonterminalKind::Ident, sym::ident => NonterminalKind::Ident,
sym::lifetime => NonterminalKind::Lifetime, sym::lifetime => NonterminalKind::Lifetime,

View File

@ -1,4 +1,4 @@
//@ compile-flags: --edition=2021 //@ compile-flags: --edition=2018
// This test ensures that expr_2021 is not allowed on pre-2024 editions // This test ensures that expr_2021 is not allowed on pre-2024 editions