Skip to content

Commit c75f7ec

Browse files
committed
let_chains: note re. back-compat wrt. expr beginning.
1 parent 7abb235 commit c75f7ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libsyntax/ext/tt/macro_parser.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,9 @@ fn may_begin_with(token: &Token, name: Name) -> bool {
825825
}
826826

827827
match name {
828-
sym::expr => token.can_begin_expr() && !token.is_keyword(kw::Let),
828+
sym::expr => token.can_begin_expr()
829+
// This exception is here for backwards compatibility.
830+
&& !token.is_keyword(kw::Let),
829831
sym::ty => token.can_begin_type(),
830832
sym::ident => get_macro_name(token).is_some(),
831833
sym::literal => token.can_begin_literal_or_bool(),

0 commit comments

Comments
 (0)