Skip to content

Commit d693eba

Browse files
committed
Auto merge of rust-lang#125828 - vincenzopalazzo:macros/performance-regression, r=<try>
[perf-only] rustc_parser: avoid checking the edition as much as possible CC rust-lang#123865 r? ghost
2 parents ada5e2c + 252f83a commit d693eba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_parse/src/parser/nonterminal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl<'a> Parser<'a> {
4747
token.can_begin_expr()
4848
// This exception is here for backwards compatibility.
4949
&& !token.is_keyword(kw::Let)
50-
&& (token.span.edition().at_least_rust_2024() || !token.is_keyword(kw::Const))
50+
&& (!token.is_keyword(kw::Const) || token.span.edition().at_least_rust_2024())
5151
}
5252
NonterminalKind::Ty => token.can_begin_type(),
5353
NonterminalKind::Ident => get_macro_ident(token).is_some(),

0 commit comments

Comments
 (0)