Skip to content

Commit

Permalink
let_chains: note re. back-compat wrt. expr beginning.
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Jun 22, 2019
1 parent 7abb235 commit c75f7ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libsyntax/ext/tt/macro_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,9 @@ fn may_begin_with(token: &Token, name: Name) -> bool {
}

match name {
sym::expr => token.can_begin_expr() && !token.is_keyword(kw::Let),
sym::expr => token.can_begin_expr()
// This exception is here for backwards compatibility.
&& !token.is_keyword(kw::Let),
sym::ty => token.can_begin_type(),
sym::ident => get_macro_name(token).is_some(),
sym::literal => token.can_begin_literal_or_bool(),
Expand Down

0 comments on commit c75f7ec

Please sign in to comment.