]> git.lizzy.rs Git - rust.git/blob - tests/ui/unused_unit.stderr
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / unused_unit.stderr
1 error: unneeded unit return type
2   --> $DIR/unused_unit.rs:25:59
3    |
4 LL |       pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) ->
5    |  ___________________________________________________________^
6 LL | |         ()
7    | |__________^ help: remove the `-> ()`
8    |
9 note: lint level defined here
10   --> $DIR/unused_unit.rs:19:9
11    |
12 LL | #![deny(clippy::unused_unit)]
13    |         ^^^^^^^^^^^^^^^^^^^
14
15 error: unneeded unit return type
16   --> $DIR/unused_unit.rs:35:19
17    |
18 LL |     fn into(self) -> () {
19    |                   ^^^^^ help: remove the `-> ()`
20
21 error: unneeded unit expression
22   --> $DIR/unused_unit.rs:36:9
23    |
24 LL |         ()
25    |         ^^ help: remove the final `()`
26
27 error: unneeded unit return type
28   --> $DIR/unused_unit.rs:40:18
29    |
30 LL | fn return_unit() -> () { () }
31    |                  ^^^^^ help: remove the `-> ()`
32
33 error: unneeded unit expression
34   --> $DIR/unused_unit.rs:40:26
35    |
36 LL | fn return_unit() -> () { () }
37    |                          ^^ help: remove the final `()`
38
39 error: unneeded `()`
40   --> $DIR/unused_unit.rs:47:14
41    |
42 LL |         break();
43    |              ^^ help: remove the `()`
44
45 error: unneeded `()`
46   --> $DIR/unused_unit.rs:49:11
47    |
48 LL |     return();
49    |           ^^ help: remove the `()`
50
51 error: aborting due to 7 previous errors
52