fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: leading irrefutable pattern in let chain 2 --> $DIR/irrefutable-lets.rs:13:8 3 | 4LL | if let first = &opt && let Some(ref second) = first && let None = second.start {} 5 | ^^^^^^^^^^^^^^^^ 6 | 7 = note: this pattern will always match 8 = help: consider moving it outside of the construct 9note: the lint level is defined here 10 --> $DIR/irrefutable-lets.rs:6:30 11 | 12LL | #![cfg_attr(disallowed, deny(irrefutable_let_patterns))] 13 | ^^^^^^^^^^^^^^^^^^^^^^^^ 14 15error: irrefutable `if let` patterns 16 --> $DIR/irrefutable-lets.rs:19:8 17 | 18LL | if let first = &opt && let (a, b) = (1, 2) {} 19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 20 | 21 = note: these patterns will always match, so the `if let` is useless 22 = help: consider replacing the `if let` with a `let` 23 24error: leading irrefutable pattern in let chain 25 --> $DIR/irrefutable-lets.rs:22:8 26 | 27LL | if let first = &opt && let Some(ref second) = first && let None = second.start && let v = 0 {} 28 | ^^^^^^^^^^^^^^^^ 29 | 30 = note: this pattern will always match 31 = help: consider moving it outside of the construct 32 33error: trailing irrefutable pattern in let chain 34 --> $DIR/irrefutable-lets.rs:22:87 35 | 36LL | if let first = &opt && let Some(ref second) = first && let None = second.start && let v = 0 {} 37 | ^^^^^^^^^ 38 | 39 = note: this pattern will always match 40 = help: consider moving it into the body 41 42error: trailing irrefutable patterns in let chain 43 --> $DIR/irrefutable-lets.rs:26:37 44 | 45LL | if let Some(ref first) = opt && let second = first && let _third = second {} 46 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 47 | 48 = note: these patterns will always match 49 = help: consider moving them into the body 50 51error: leading irrefutable pattern in let chain 52 --> $DIR/irrefutable-lets.rs:29:8 53 | 54LL | if let Range { start: local_start, end: _ } = (None..Some(1)) && let None = local_start {} 55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 56 | 57 = note: this pattern will always match 58 = help: consider moving it outside of the construct 59 60error: leading irrefutable pattern in let chain 61 --> $DIR/irrefutable-lets.rs:32:8 62 | 63LL | if let (a, b, c) = (Some(1), Some(1), Some(1)) && let None = Some(1) {} 64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 65 | 66 = note: this pattern will always match 67 = help: consider moving it outside of the construct 68 69error: leading irrefutable pattern in let chain 70 --> $DIR/irrefutable-lets.rs:35:8 71 | 72LL | if let first = &opt && let None = Some(1) {} 73 | ^^^^^^^^^^^^^^^^ 74 | 75 = note: this pattern will always match 76 = help: consider moving it outside of the construct 77 78error: irrefutable `if let` guard patterns 79 --> $DIR/irrefutable-lets.rs:44:28 80 | 81LL | Some(ref first) if let second = first && let _third = second && let v = 4 + 4 => {}, 82 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 83 | 84 = note: these patterns will always match, so the guard is useless 85 = help: consider removing the guard and adding a `let` inside the match arm 86 87error: trailing irrefutable patterns in let chain 88 --> $DIR/irrefutable-lets.rs:59:16 89 | 90LL | && let v = local_end && let w = v => {}, 91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 92 | 93 = note: these patterns will always match 94 = help: consider moving them into the body 95 96error: irrefutable `while let` patterns 97 --> $DIR/irrefutable-lets.rs:68:11 98 | 99LL | while let first = &opt && let (a, b) = (1, 2) {} 100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 101 | 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 104 105error: trailing irrefutable patterns in let chain 106 --> $DIR/irrefutable-lets.rs:71:40 107 | 108LL | while let Some(ref first) = opt && let second = first && let _third = second {} 109 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 110 | 111 = note: these patterns will always match 112 = help: consider moving them into the body 113 114error: aborting due to 12 previous errors 115