2020-12-05 15:12:39 -06:00
|
|
|
error: irrefutable `if let` guard pattern
|
2021-08-11 09:10:05 -05:00
|
|
|
--> $DIR/warns.rs:6:24
|
2020-11-15 16:42:48 -06:00
|
|
|
|
|
|
|
|
LL | Some(x) if let () = x => {}
|
|
|
|
| ^^
|
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= note: this pattern will always match, so the guard is useless
|
|
|
|
= help: consider removing the guard and adding a `let` inside the match arm
|
2020-11-15 16:42:48 -06:00
|
|
|
note: the lint level is defined here
|
2021-08-11 09:10:05 -05:00
|
|
|
--> $DIR/warns.rs:3:8
|
2020-11-15 16:42:48 -06:00
|
|
|
|
|
|
|
|
LL | #[deny(irrefutable_let_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unreachable pattern
|
2021-08-11 09:10:05 -05:00
|
|
|
--> $DIR/warns.rs:15:25
|
2020-11-15 16:42:48 -06:00
|
|
|
|
|
|
|
|
LL | x if let None | None = x => {}
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
2021-08-11 09:10:05 -05:00
|
|
|
--> $DIR/warns.rs:12:8
|
2020-11-15 16:42:48 -06:00
|
|
|
|
|
|
|
|
LL | #[deny(unreachable_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|