about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libsyntax/ext/tt/macro_parser.rs2
-rw-r--r--src/libsyntax/parse/token.rs3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs
index d5da4c920bc..0db6bd59afc 100644
--- a/src/libsyntax/ext/tt/macro_parser.rs
+++ b/src/libsyntax/ext/tt/macro_parser.rs
@@ -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(),
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index eec09c08702..ebd0decacb5 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -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,