1
Fork 0

let_chains: readd kw::let to ident_can_begin_expr.

This commit is contained in:
Mazdak Farrokhzad 2019-06-17 00:45:09 +02:00
parent 61fc727fe0
commit 92587e41d9
2 changed files with 2 additions and 3 deletions

View file

@ -825,7 +825,7 @@ fn may_begin_with(token: &Token, name: Name) -> bool {
}
match name {
sym::expr => token.can_begin_expr(),
sym::expr => token.can_begin_expr() && !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(),

View file

@ -135,8 +135,7 @@ pub(crate) fn ident_can_begin_expr(name: ast::Name, span: Span, is_raw: bool) ->
kw::False,
kw::For,
kw::If,
// FIXME(53667): Consider whether `Let` can be added here.
// kw::Let,
kw::Let,
kw::Loop,
kw::Match,
kw::Move,