rust/tests/ui/let-else/let-else-irrefutable.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
618 B
Plaintext
Raw Normal View History

2021-08-01 19:18:50 -05:00
warning: irrefutable `let...else` pattern
--> $DIR/let-else-irrefutable.rs:4:5
2021-08-01 19:18:50 -05:00
|
LL | let x = 1 else { return };
| ^^^^^^^^^
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
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