2021-08-01 19:18:50 -05:00
|
|
|
warning: irrefutable `let...else` pattern
|
2022-10-29 22:02:10 -05:00
|
|
|
--> $DIR/let-else-irrefutable.rs:4:5
|
2021-08-01 19:18:50 -05:00
|
|
|
|
|
|
|
|
LL | let x = 1 else { return };
|
2022-10-29 22:02:10 -05:00
|
|
|
| ^^^^^^^^^
|
2021-08-01 19:18:50 -05:00
|
|
|
|
|
|
|
|
= note: this pattern will always match, so the `else` clause is useless
|
|
|
|
= help: consider removing the `else` clause
|
2022-09-18 10:55:36 -05:00
|
|
|
= note: `#[warn(irrefutable_let_patterns)]` on by default
|
2021-08-01 19:18:50 -05:00
|
|
|
|
2022-10-29 22:02:10 -05:00
|
|
|
warning: irrefutable `let...else` pattern
|
|
|
|
--> $DIR/let-else-irrefutable.rs:7:5
|
|
|
|
|
|
|
|
|
LL | let x = 1 else {
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: this pattern will always match, so the `else` clause is useless
|
|
|
|
= help: consider removing the `else` clause
|
|
|
|
|
|
|
|
warning: 2 warnings emitted
|
2021-08-01 19:18:50 -05:00
|
|
|
|