about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libsyntax/parse/token.rs3
-rw-r--r--src/test/ui/rfc-2497-if-let-chains/feature-gate.rs5
-rw-r--r--src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr6
3 files changed, 8 insertions, 6 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 98e06ad73c9..eec09c08702 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -134,8 +134,9 @@ pub(crate) fn ident_can_begin_expr(name: ast::Name, span: Span, is_raw: bool) ->
         kw::Continue,
         kw::False,
         kw::For,
-        kw::Let,
         kw::If,
+        // FIXME(53667): Consider whether `Let` can be added here.
+        // kw::Let,
         kw::Loop,
         kw::Match,
         kw::Move,
diff --git a/src/test/ui/rfc-2497-if-let-chains/feature-gate.rs b/src/test/ui/rfc-2497-if-let-chains/feature-gate.rs
index cf4a44a9ce7..b6f70b912ac 100644
--- a/src/test/ui/rfc-2497-if-let-chains/feature-gate.rs
+++ b/src/test/ui/rfc-2497-if-let-chains/feature-gate.rs
@@ -91,11 +91,12 @@ fn _macros() {
             while $e {}
         }
     }
-    use_expr!(let 0 = 1 && 0 == 0);
+    use_expr!((let 0 = 1 && 0 == 0));
     //~^ ERROR `let` expressions in this position are experimental [E0658]
     use_expr!((let 0 = 1));
     //~^ ERROR `let` expressions in this position are experimental [E0658]
-    use_expr!(let 0 = 1);
+    // use_expr!(let 0 = 1);
+    // ^--- FIXME(53667): Consider whether `Let` can be added to `ident_can_begin_expr`.
 }
 
 fn main() {}
diff --git a/src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr b/src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr
index f641429a6bb..fdfbb8fe4d4 100644
--- a/src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr
+++ b/src/test/ui/rfc-2497-if-let-chains/feature-gate.stderr
@@ -251,10 +251,10 @@ LL |     while let Range { start: _, end: _ } = (true..true) && false {}
    = help: add #![feature(let_chains)] to the crate attributes to enable
 
 error[E0658]: `let` expressions in this position are experimental
-  --> $DIR/feature-gate.rs:94:15
+  --> $DIR/feature-gate.rs:94:16
    |
-LL |     use_expr!(let 0 = 1 && 0 == 0);
-   |               ^^^^^^^^^
+LL |     use_expr!((let 0 = 1 && 0 == 0));
+   |                ^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/53667
    = help: add #![feature(let_chains)] to the crate attributes to enable