Skip to content

Commit 3986ea0

Browse files
eholkfmease
andcommitted
Update compiler/rustc_parse/src/parser/nonterminal.rs
Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
1 parent f364011 commit 3986ea0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_parse/src/parser/nonterminal.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use rustc_ast::token::{self, Delimiter, Nonterminal, Nonterminal::*, Nonterminal
33
use rustc_ast::HasTokens;
44
use rustc_ast_pretty::pprust;
55
use rustc_errors::PResult;
6-
use rustc_span::edition::Edition;
76
use rustc_span::symbol::{kw, Ident};
87

98
use crate::errors::UnexpectedNonterminal;
@@ -49,7 +48,7 @@ impl<'a> Parser<'a> {
4948
token.can_begin_expr()
5049
// This exception is here for backwards compatibility.
5150
&& !token.is_keyword(kw::Let)
52-
&& (token.span.edition() >= Edition::Edition2024 || !token.is_keyword(kw::Const))
51+
&& (token.span.edition().at_least_rust_2024() || !token.is_keyword(kw::Const))
5352
}
5453
NonterminalKind::Ty => token.can_begin_type(),
5554
NonterminalKind::Ident => get_macro_ident(token).is_some(),

0 commit comments

Comments
 (0)