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