Introduce if-let guards in the HIR

This commit is contained in:
LeSeulArtichaut 2020-10-24 21:13:54 +02:00
parent a68864b688
commit 77d80b22f1
6 changed files with 24 additions and 15 deletions

View file

@ -6,7 +6,6 @@ fn _if_let_guard() {
match () {
() if let 0 = 1 => {}
//~^ ERROR `if let` guard is not implemented
//~| ERROR `let` expressions are not supported here
() if (let 0 = 1) => {}
//~^ ERROR `let` expressions in this position are experimental

View file

@ -169,15 +169,6 @@ LL | use_expr!((let 0 = 1));
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
= help: add `#![feature(let_chains)]` to the crate attributes to enable
error: `let` expressions are not supported here
--> $DIR/feature-gate.rs:7:15
|
LL | () if let 0 = 1 => {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if`- and `while`-expressions
= note: as well as when nested within `&&` and parenthesis in those conditions
error: `let` expressions are not supported here
--> $DIR/feature-gate.rs:11:16
|