2021-08-02 00:18:50 +00:00
|
|
|
warning: irrefutable `let...else` pattern
|
2022-10-30 03:02:10 +00:00
|
|
|
--> $DIR/let-else-irrefutable.rs:4:5
|
2021-08-02 00:18:50 +00:00
|
|
|
|
|
|
|
|
LL | let x = 1 else { return };
|
2022-10-30 03:02:10 +00:00
|
|
|
| ^^^^^^^^^
|
2021-08-02 00:18:50 +00:00
|
|
|
|
|
|
|
|
= note: this pattern will always match, so the `else` clause is useless
|
|
|
|
= help: consider removing the `else` clause
|
2022-09-18 15:55:36 +00:00
|
|
|
= note: `#[warn(irrefutable_let_patterns)]` on by default
|
2021-08-02 00:18:50 +00:00
|
|
|
|
2022-10-30 03:02:10 +00: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-02 00:18:50 +00:00
|
|
|
|