1 error: unneeded unit return type
2 --> $DIR/unused_unit.rs:19:58
4 LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
5 | ^^^^^^ help: remove the `-> ()`
7 note: the lint level is defined here
8 --> $DIR/unused_unit.rs:12:9
10 LL | #![deny(clippy::unused_unit)]
13 error: unneeded unit return type
14 --> $DIR/unused_unit.rs:19:28
16 LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
17 | ^^^^^^ help: remove the `-> ()`
19 error: unneeded unit return type
20 --> $DIR/unused_unit.rs:20:18
22 LL | where G: Fn() -> () {
23 | ^^^^^^ help: remove the `-> ()`
25 error: unneeded unit return type
26 --> $DIR/unused_unit.rs:21:26
28 LL | let _y: &dyn Fn() -> () = &f;
29 | ^^^^^^ help: remove the `-> ()`
31 error: unneeded unit return type
32 --> $DIR/unused_unit.rs:28:18
34 LL | fn into(self) -> () {
35 | ^^^^^^ help: remove the `-> ()`
37 error: unneeded unit expression
38 --> $DIR/unused_unit.rs:29:9
41 | ^^ help: remove the final `()`
43 error: unneeded unit return type
44 --> $DIR/unused_unit.rs:34:29
46 LL | fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
47 | ^^^^^^ help: remove the `-> ()`
49 error: unneeded unit return type
50 --> $DIR/unused_unit.rs:36:19
52 LL | G: FnMut() -> (),
53 | ^^^^^^ help: remove the `-> ()`
55 error: unneeded unit return type
56 --> $DIR/unused_unit.rs:37:16
59 | ^^^^^^ help: remove the `-> ()`
61 error: unneeded unit return type
62 --> $DIR/unused_unit.rs:41:29
64 LL | fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
65 | ^^^^^^ help: remove the `-> ()`
67 error: unneeded unit return type
68 --> $DIR/unused_unit.rs:43:19
70 LL | G: FnMut() -> (),
71 | ^^^^^^ help: remove the `-> ()`
73 error: unneeded unit return type
74 --> $DIR/unused_unit.rs:44:16
77 | ^^^^^^ help: remove the `-> ()`
79 error: unneeded unit return type
80 --> $DIR/unused_unit.rs:47:17
82 LL | fn return_unit() -> () { () }
83 | ^^^^^^ help: remove the `-> ()`
85 error: unneeded unit expression
86 --> $DIR/unused_unit.rs:47:26
88 LL | fn return_unit() -> () { () }
89 | ^^ help: remove the final `()`
92 --> $DIR/unused_unit.rs:57:14
95 | ^^ help: remove the `()`
98 --> $DIR/unused_unit.rs:59:11
101 | ^^ help: remove the `()`
103 error: unneeded unit return type
104 --> $DIR/unused_unit.rs:76:10
107 | ^^^^ help: remove the `-> ()`
109 error: unneeded unit return type
110 --> $DIR/unused_unit.rs:79:11
112 LL | fn test2() ->(){}
113 | ^^^^^ help: remove the `-> ()`
115 error: unneeded unit return type
116 --> $DIR/unused_unit.rs:82:11
118 LL | fn test3()-> (){}
119 | ^^^^^ help: remove the `-> ()`
121 error: aborting due to 19 previous errors