]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/let_unit.stderr
Rollup merge of #99423 - GuillaumeGomez:group-css-font-rule, r=notriddle
[rust.git] / src / tools / clippy / tests / ui / let_unit.stderr
1 error: this let-binding has unit value
2   --> $DIR/let_unit.rs:14:5
3    |
4 LL |     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
9 error: this let-binding has unit value
10   --> $DIR/let_unit.rs:18:9
11    |
12 LL |         let _a = ();
13    |         ^^^^^^^^^^^^ help: omit the `let` binding: `();`
14
15 error: this let-binding has unit value
16   --> $DIR/let_unit.rs:53:5
17    |
18 LL | /     let _ = v
19 LL | |         .into_iter()
20 LL | |         .map(|i| i * 2)
21 LL | |         .filter(|i| i % 2 == 0)
22 LL | |         .map(|_| ())
23 LL | |         .next()
24 LL | |         .unwrap();
25    | |__________________^
26    |
27 help: omit the `let` binding
28    |
29 LL ~     v
30 LL +         .into_iter()
31 LL +         .map(|i| i * 2)
32 LL +         .filter(|i| i % 2 == 0)
33 LL +         .map(|_| ())
34 LL +         .next()
35 LL +         .unwrap();
36    |
37
38 error: this let-binding has unit value
39   --> $DIR/let_unit.rs:80:5
40    |
41 LL |     let x: () = f(); // Lint.
42    |     ^^^^-^^^^^^^^^^^
43    |         |
44    |         help: use a wild (`_`) binding: `_`
45
46 error: this let-binding has unit value
47   --> $DIR/let_unit.rs:83:5
48    |
49 LL |     let x: () = f2(0i32); // Lint.
50    |     ^^^^-^^^^^^^^^^^^^^^^
51    |         |
52    |         help: use a wild (`_`) binding: `_`
53
54 error: this let-binding has unit value
55   --> $DIR/let_unit.rs:85:5
56    |
57 LL |     let _: () = f3(()); // Lint
58    |     ^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `f3(());`
59
60 error: this let-binding has unit value
61   --> $DIR/let_unit.rs:86:5
62    |
63 LL |     let x: () = f3(()); // Lint
64    |     ^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `f3(());`
65
66 error: this let-binding has unit value
67   --> $DIR/let_unit.rs:102:5
68    |
69 LL |     let x: () = if true { f() } else { f2(0) }; // Lint
70    |     ^^^^-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
71    |         |
72    |         help: use a wild (`_`) binding: `_`
73
74 error: this let-binding has unit value
75   --> $DIR/let_unit.rs:113:5
76    |
77 LL | /     let _: () = match Some(0) {
78 LL | |         None => f2(1),
79 LL | |         Some(0) => f(),
80 LL | |         Some(1) => f2(3),
81 LL | |         Some(_) => (),
82 LL | |     };
83    | |______^
84    |
85 help: omit the `let` binding
86    |
87 LL ~     match Some(0) {
88 LL +         None => f2(1),
89 LL +         Some(0) => f(),
90 LL +         Some(1) => f2(3),
91 LL +         Some(_) => (),
92 LL +     };
93    |
94
95 error: this let-binding has unit value
96   --> $DIR/let_unit.rs:160:13
97    |
98 LL |             let _: () = z;
99    |             ^^^^^^^^^^^^^^ help: omit the `let` binding: `z;`
100
101 error: aborting due to 10 previous errors
102