-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #93213 - c410-f3r:let-chains-feature, r=matthewjasper
- Loading branch information
Showing
5 changed files
with
112 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
fn main() { | ||
match true { | ||
_ if let true = true && true => {} | ||
//~^ ERROR `if let` guards are | ||
//~| ERROR `let` expressions in this | ||
_ => {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
error[E0658]: `if let` guards are experimental | ||
--> $DIR/issue-93150.rs:3:11 | ||
| | ||
LL | _ if let true = true && true => {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information | ||
= help: add `#![feature(if_let_guard)]` to the crate attributes to enable | ||
= help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>` | ||
|
||
error[E0658]: `let` expressions in this position are unstable | ||
--> $DIR/issue-93150.rs:3:14 | ||
| | ||
LL | _ if let true = true && true => {} | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
= 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: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |