Add let_else feature gate
This commit is contained in:
parent
ae32e88909
commit
960ea093ab
5 changed files with 33 additions and 0 deletions
5
src/test/ui/feature-gates/feature-gate-let_else.rs
Normal file
5
src/test/ui/feature-gates/feature-gate-let_else.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
fn main() {
|
||||
let Some(x) = Some(1) else { //~ ERROR `let...else` statements are unstable
|
||||
return;
|
||||
};
|
||||
}
|
||||
14
src/test/ui/feature-gates/feature-gate-let_else.stderr
Normal file
14
src/test/ui/feature-gates/feature-gate-let_else.stderr
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
error[E0658]: `let...else` statements are unstable
|
||||
--> $DIR/feature-gate-let_else.rs:2:5
|
||||
|
|
||||
LL | / let Some(x) = Some(1) else {
|
||||
LL | | return;
|
||||
LL | | };
|
||||
| |______^
|
||||
|
|
||||
= note: see issue #87335 <https://github.com/rust-lang/rust/issues/87335> for more information
|
||||
= help: add `#![feature(let_else)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue