diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 98e06ad73c94..eec09c08702d 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 cf4a44a9ce77..b6f70b912aca 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 f641429a6bbb..fdfbb8fe4d44 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