let_chains: note re. back-compat wrt. expr beginning.
This commit is contained in:
parent
7abb2350df
commit
c75f7ecaee
1 changed files with 3 additions and 1 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue