summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/unused_unit.stderr
blob: 0d2cb77855be1198a45f9ee31bb930a56312e151 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
error: unneeded unit return type
  --> $DIR/unused_unit.rs:19:58
   |
LL |     pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
   |                                                          ^^^^^^ help: remove the `-> ()`
   |
note: the lint level is defined here
  --> $DIR/unused_unit.rs:12:9
   |
LL | #![deny(clippy::unused_unit)]
   |         ^^^^^^^^^^^^^^^^^^^

error: unneeded unit return type
  --> $DIR/unused_unit.rs:19:28
   |
LL |     pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
   |                            ^^^^^^ help: remove the `-> ()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:20:18
   |
LL |     where G: Fn() -> () {
   |                  ^^^^^^ help: remove the `-> ()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:21:26
   |
LL |         let _y: &dyn Fn() -> () = &f;
   |                          ^^^^^^ help: remove the `-> ()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:28:18
   |
LL |     fn into(self) -> () {
   |                  ^^^^^^ help: remove the `-> ()`

error: unneeded unit expression
  --> $DIR/unused_unit.rs:29:9
   |
LL |         ()
   |         ^^ help: remove the final `()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:34:29
   |
LL |     fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
   |                             ^^^^^^ help: remove the `-> ()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:36:19
   |
LL |         G: FnMut() -> (),
   |                   ^^^^^^ help: remove the `-> ()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:37:16
   |
LL |         H: Fn() -> ();
   |                ^^^^^^ help: remove the `-> ()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:41:29
   |
LL |     fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
   |                             ^^^^^^ help: remove the `-> ()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:43:19
   |
LL |         G: FnMut() -> (),
   |                   ^^^^^^ help: remove the `-> ()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:44:16
   |
LL |         H: Fn() -> () {}
   |                ^^^^^^ help: remove the `-> ()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:47:17
   |
LL | fn return_unit() -> () { () }
   |                 ^^^^^^ help: remove the `-> ()`

error: unneeded unit expression
  --> $DIR/unused_unit.rs:47:26
   |
LL | fn return_unit() -> () { () }
   |                          ^^ help: remove the final `()`

error: unneeded `()`
  --> $DIR/unused_unit.rs:57:14
   |
LL |         break();
   |              ^^ help: remove the `()`

error: unneeded `()`
  --> $DIR/unused_unit.rs:59:11
   |
LL |     return();
   |           ^^ help: remove the `()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:76:10
   |
LL | fn test()->(){}
   |          ^^^^ help: remove the `-> ()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:79:11
   |
LL | fn test2() ->(){}
   |           ^^^^^ help: remove the `-> ()`

error: unneeded unit return type
  --> $DIR/unused_unit.rs:82:11
   |
LL | fn test3()-> (){}
   |           ^^^^^ help: remove the `-> ()`

error: aborting due to 19 previous errors