]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2294-if-let-guard/warns.stderr
Add a few basic tests for if-let guards
[rust.git] / src / test / ui / rfc-2294-if-let-guard / warns.stderr
1 error: irrefutable if-let guard
2   --> $DIR/warns.rs:7:24
3    |
4 LL |         Some(x) if let () = x => {}
5    |                        ^^
6    |
7 note: the lint level is defined here
8   --> $DIR/warns.rs:4:8
9    |
10 LL | #[deny(irrefutable_let_patterns)]
11    |        ^^^^^^^^^^^^^^^^^^^^^^^^
12
13 error: unreachable pattern
14   --> $DIR/warns.rs:16:25
15    |
16 LL |         x if let None | None = x => {}
17    |                         ^^^^
18    |
19 note: the lint level is defined here
20   --> $DIR/warns.rs:13:8
21    |
22 LL | #[deny(unreachable_patterns)]
23    |        ^^^^^^^^^^^^^^^^^^^^
24
25 error: aborting due to 2 previous errors
26