diff --git a/compiler/rustc_ast/src/token.rs b/compiler/rustc_ast/src/token.rs index cdedf71f1af5e..4cb4d2e4e86c6 100644 --- a/compiler/rustc_ast/src/token.rs +++ b/compiler/rustc_ast/src/token.rs @@ -907,7 +907,7 @@ impl NonterminalKind { }, sym::pat_param => NonterminalKind::PatParam { inferred: false }, sym::expr => NonterminalKind::Expr, - sym::expr_2021 if edition() >= Edition::Edition2021 => NonterminalKind::Expr2021, + sym::expr_2021 if edition().at_least_rust_2021() => NonterminalKind::Expr2021, sym::ty => NonterminalKind::Ty, sym::ident => NonterminalKind::Ident, sym::lifetime => NonterminalKind::Lifetime,