expr_2021 should be allowed on edition 2021 and later
This commit is contained in:
parent
65da4adfcd
commit
73303c3b45
@ -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,
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user