fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: this let-binding has unit value 2 --> $DIR/let_unit.rs:12:5 3 | 4LL | let _x = println!("x"); 5 | ^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `println!("x");` 6 | 7 = note: `-D clippy::let-unit-value` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::let_unit_value)]` 9 10error: this let-binding has unit value 11 --> $DIR/let_unit.rs:16:9 12 | 13LL | let _a = (); 14 | ^^^^^^^^^^^^ help: omit the `let` binding: `();` 15 16error: this let-binding has unit value 17 --> $DIR/let_unit.rs:51:5 18 | 19LL | / let _ = v 20LL | | .into_iter() 21LL | | .map(|i| i * 2) 22LL | | .filter(|i| i % 2 == 0) 23LL | | .map(|_| ()) 24LL | | .next() 25LL | | .unwrap(); 26 | |__________________^ 27 | 28help: omit the `let` binding 29 | 30LL ~ v 31LL + .into_iter() 32LL + .map(|i| i * 2) 33LL + .filter(|i| i % 2 == 0) 34LL + .map(|_| ()) 35LL + .next() 36LL + .unwrap(); 37 | 38 39error: this let-binding has unit value 40 --> $DIR/let_unit.rs:78:5 41 | 42LL | let x: () = f(); // Lint. 43 | ^^^^-^^^^^^^^^^^ 44 | | 45 | help: use a wild (`_`) binding: `_` 46 47error: this let-binding has unit value 48 --> $DIR/let_unit.rs:81:5 49 | 50LL | let x: () = f2(0i32); // Lint. 51 | ^^^^-^^^^^^^^^^^^^^^^ 52 | | 53 | help: use a wild (`_`) binding: `_` 54 55error: this let-binding has unit value 56 --> $DIR/let_unit.rs:83:5 57 | 58LL | let _: () = f3(()); // Lint 59 | ^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `f3(());` 60 61error: this let-binding has unit value 62 --> $DIR/let_unit.rs:84:5 63 | 64LL | let x: () = f3(()); // Lint 65 | ^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `f3(());` 66 67error: this let-binding has unit value 68 --> $DIR/let_unit.rs:100:5 69 | 70LL | let x: () = if true { f() } else { f2(0) }; // Lint 71 | ^^^^-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 72 | | 73 | help: use a wild (`_`) binding: `_` 74 75error: this let-binding has unit value 76 --> $DIR/let_unit.rs:111:5 77 | 78LL | / let _: () = match Some(0) { 79LL | | None => f2(1), 80LL | | Some(0) => f(), 81LL | | Some(1) => f2(3), 82LL | | Some(_) => (), 83LL | | }; 84 | |______^ 85 | 86help: omit the `let` binding 87 | 88LL ~ match Some(0) { 89LL + None => f2(1), 90LL + Some(0) => f(), 91LL + Some(1) => f2(3), 92LL + Some(_) => (), 93LL + }; 94 | 95 96error: this let-binding has unit value 97 --> $DIR/let_unit.rs:158:13 98 | 99LL | let _: () = z; 100 | ^^^^^^^^^^^^^^ help: omit the `let` binding: `z;` 101 102error: aborting due to 10 previous errors 103