1 error: leading irrefutable pattern in let chain
2 --> $DIR/irrefutable-lets.rs:13:8
4 LL | if let first = &opt && let Some(ref second) = first && let None = second.start {}
7 = note: this pattern will always match
8 = help: consider moving it outside of the construct
9 note: the lint level is defined here
10 --> $DIR/irrefutable-lets.rs:6:30
12 LL | #![cfg_attr(disallowed, deny(irrefutable_let_patterns))]
13 | ^^^^^^^^^^^^^^^^^^^^^^^^
15 error: irrefutable `if let` patterns
16 --> $DIR/irrefutable-lets.rs:19:8
18 LL | if let first = &opt && let (a, b) = (1, 2) {}
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21 = note: these patterns will always match, so the `if let` is useless
22 = help: consider replacing the `if let` with a `let`
24 error: leading irrefutable pattern in let chain
25 --> $DIR/irrefutable-lets.rs:22:8
27 LL | if let first = &opt && let Some(ref second) = first && let None = second.start && let v = 0 {}
30 = note: this pattern will always match
31 = help: consider moving it outside of the construct
33 error: trailing irrefutable pattern in let chain
34 --> $DIR/irrefutable-lets.rs:22:87
36 LL | if let first = &opt && let Some(ref second) = first && let None = second.start && let v = 0 {}
39 = note: this pattern will always match
40 = help: consider moving it into the body
42 error: trailing irrefutable patterns in let chain
43 --> $DIR/irrefutable-lets.rs:26:37
45 LL | if let Some(ref first) = opt && let second = first && let _third = second {}
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48 = note: these patterns will always match
49 = help: consider moving them into the body
51 error: leading irrefutable pattern in let chain
52 --> $DIR/irrefutable-lets.rs:29:8
54 LL | if let Range { start: local_start, end: _ } = (None..Some(1)) && let None = local_start {}
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57 = note: this pattern will always match
58 = help: consider moving it outside of the construct
60 error: leading irrefutable pattern in let chain
61 --> $DIR/irrefutable-lets.rs:32:8
63 LL | if let (a, b, c) = (Some(1), Some(1), Some(1)) && let None = Some(1) {}
64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66 = note: this pattern will always match
67 = help: consider moving it outside of the construct
69 error: leading irrefutable pattern in let chain
70 --> $DIR/irrefutable-lets.rs:35:8
72 LL | if let first = &opt && let None = Some(1) {}
75 = note: this pattern will always match
76 = help: consider moving it outside of the construct
78 error: irrefutable `let` patterns
79 --> $DIR/irrefutable-lets.rs:44:28
81 LL | Some(ref first) if let second = first && let _third = second && let v = 4 + 4 => {},
82 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84 = note: these patterns will always match, so the `let` is useless
85 = help: consider removing `let`
87 error: leading irrefutable pattern in let chain
88 --> $DIR/irrefutable-lets.rs:50:28
90 LL | Some(ref first) if let Range { start: local_start, end: _ } = first
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93 = note: this pattern will always match
94 = help: consider moving it outside of the construct
96 error: irrefutable `while let` patterns
97 --> $DIR/irrefutable-lets.rs:59:11
99 LL | while let first = &opt && let (a, b) = (1, 2) {}
100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102 = note: these patterns will always match, so the loop will never exit
103 = help: consider instead using a `loop { ... }` with a `let` inside it
105 error: trailing irrefutable patterns in let chain
106 --> $DIR/irrefutable-lets.rs:62:40
108 LL | while let Some(ref first) = opt && let second = first && let _third = second {}
109 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111 = note: these patterns will always match
112 = help: consider moving them into the body
114 error: aborting due to 12 previous errors