let_chains: Comment out Let in ident_can_begin_expr.
This commit is contained in:
parent
530f954e92
commit
86250a666e
@ -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,
|
||||
|
@ -91,11 +91,12 @@ macro_rules! use_expr {
|
||||
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() {}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user