]> git.lizzy.rs Git - rust.git/blob - tests/ui/unused_unit.stderr
iterate List by value
[rust.git] / tests / ui / unused_unit.stderr
1 error: unneeded unit return type
2   --> $DIR/unused_unit.rs:18:29
3    |
4 LL |     pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
5    |                             ^^^^^ help: remove the `-> ()`
6    |
7 note: the lint level is defined here
8   --> $DIR/unused_unit.rs:12:9
9    |
10 LL | #![deny(clippy::unused_unit)]
11    |         ^^^^^^^^^^^^^^^^^^^
12
13 error: unneeded unit return type
14   --> $DIR/unused_unit.rs:19:19
15    |
16 LL |     where G: Fn() -> () {
17    |                   ^^^^^ help: remove the `-> ()`
18
19 error: unneeded unit return type
20   --> $DIR/unused_unit.rs:18:59
21    |
22 LL |     pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
23    |                                                           ^^^^^ help: remove the `-> ()`
24
25 error: unneeded unit return type
26   --> $DIR/unused_unit.rs:20:27
27    |
28 LL |         let _y: &dyn Fn() -> () = &f;
29    |                           ^^^^^ help: remove the `-> ()`
30
31 error: unneeded unit return type
32   --> $DIR/unused_unit.rs:27:19
33    |
34 LL |     fn into(self) -> () {
35    |                   ^^^^^ help: remove the `-> ()`
36
37 error: unneeded unit expression
38   --> $DIR/unused_unit.rs:28:9
39    |
40 LL |         ()
41    |         ^^ help: remove the final `()`
42
43 error: unneeded unit return type
44   --> $DIR/unused_unit.rs:33:30
45    |
46 LL |     fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
47    |                              ^^^^^ help: remove the `-> ()`
48
49 error: unneeded unit return type
50   --> $DIR/unused_unit.rs:35:20
51    |
52 LL |         G: FnMut() -> (),
53    |                    ^^^^^ help: remove the `-> ()`
54
55 error: unneeded unit return type
56   --> $DIR/unused_unit.rs:36:17
57    |
58 LL |         H: Fn() -> ();
59    |                 ^^^^^ help: remove the `-> ()`
60
61 error: unneeded unit return type
62   --> $DIR/unused_unit.rs:40:30
63    |
64 LL |     fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
65    |                              ^^^^^ help: remove the `-> ()`
66
67 error: unneeded unit return type
68   --> $DIR/unused_unit.rs:42:20
69    |
70 LL |         G: FnMut() -> (),
71    |                    ^^^^^ help: remove the `-> ()`
72
73 error: unneeded unit return type
74   --> $DIR/unused_unit.rs:43:17
75    |
76 LL |         H: Fn() -> () {}
77    |                 ^^^^^ help: remove the `-> ()`
78
79 error: unneeded unit return type
80   --> $DIR/unused_unit.rs:46:18
81    |
82 LL | fn return_unit() -> () { () }
83    |                  ^^^^^ help: remove the `-> ()`
84
85 error: unneeded unit expression
86   --> $DIR/unused_unit.rs:46:26
87    |
88 LL | fn return_unit() -> () { () }
89    |                          ^^ help: remove the final `()`
90
91 error: unneeded `()`
92   --> $DIR/unused_unit.rs:56:14
93    |
94 LL |         break();
95    |              ^^ help: remove the `()`
96
97 error: unneeded `()`
98   --> $DIR/unused_unit.rs:58:11
99    |
100 LL |     return();
101    |           ^^ help: remove the `()`
102
103 error: aborting due to 16 previous errors
104