mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-21 10:33:27 +00:00
53 lines
1.3 KiB
Text
53 lines
1.3 KiB
Text
|
error: unneeded unit return type
|
||
|
--> $DIR/unused_unit.rs:28:59
|
||
|
|
|
||
|
28 | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) ->
|
||
|
| ___________________________________________________________^
|
||
|
29 | | ()
|
||
|
| |__________^ help: remove the `-> ()`
|
||
|
|
|
||
|
note: lint level defined here
|
||
|
--> $DIR/unused_unit.rs:21:9
|
||
|
|
|
||
|
21 | #![deny(clippy::unused_unit)]
|
||
|
| ^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: unneeded unit return type
|
||
|
--> $DIR/unused_unit.rs:37:19
|
||
|
|
|
||
|
37 | fn into(self) -> () {
|
||
|
| ^^^^^ help: remove the `-> ()`
|
||
|
|
||
|
error: unneeded unit expression
|
||
|
--> $DIR/unused_unit.rs:38:9
|
||
|
|
|
||
|
38 | ()
|
||
|
| ^^ help: remove the final `()`
|
||
|
|
||
|
error: unneeded unit return type
|
||
|
--> $DIR/unused_unit.rs:42:18
|
||
|
|
|
||
|
42 | fn return_unit() -> () { () }
|
||
|
| ^^^^^ help: remove the `-> ()`
|
||
|
|
||
|
error: unneeded unit expression
|
||
|
--> $DIR/unused_unit.rs:42:26
|
||
|
|
|
||
|
42 | fn return_unit() -> () { () }
|
||
|
| ^^ help: remove the final `()`
|
||
|
|
||
|
error: unneeded `()`
|
||
|
--> $DIR/unused_unit.rs:49:14
|
||
|
|
|
||
|
49 | break();
|
||
|
| ^^ help: remove the `()`
|
||
|
|
||
|
error: unneeded `()`
|
||
|
--> $DIR/unused_unit.rs:51:11
|
||
|
|
|
||
|
51 | return();
|
||
|
| ^^ help: remove the `()`
|
||
|
|
||
|
error: aborting due to 7 previous errors
|
||
|
|