mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 23:20:39 +00:00
43542f8d89
Starting to work on #2376, this annotation got in the way. Going to remove it for now.
52 lines
1.3 KiB
Text
52 lines
1.3 KiB
Text
error: unneeded unit return type
|
|
--> $DIR/unused_unit.rs:27:59
|
|
|
|
|
27 | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) ->
|
|
| ___________________________________________________________^
|
|
28 | | ()
|
|
| |__________^ help: remove the `-> ()`
|
|
|
|
|
note: lint level defined here
|
|
--> $DIR/unused_unit.rs:20:9
|
|
|
|
|
20 | #![deny(clippy::unused_unit)]
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: unneeded unit return type
|
|
--> $DIR/unused_unit.rs:36:19
|
|
|
|
|
36 | fn into(self) -> () {
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
error: unneeded unit expression
|
|
--> $DIR/unused_unit.rs:37:9
|
|
|
|
|
37 | ()
|
|
| ^^ help: remove the final `()`
|
|
|
|
error: unneeded unit return type
|
|
--> $DIR/unused_unit.rs:41:18
|
|
|
|
|
41 | fn return_unit() -> () { () }
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
error: unneeded unit expression
|
|
--> $DIR/unused_unit.rs:41:26
|
|
|
|
|
41 | fn return_unit() -> () { () }
|
|
| ^^ help: remove the final `()`
|
|
|
|
error: unneeded `()`
|
|
--> $DIR/unused_unit.rs:48:14
|
|
|
|
|
48 | break();
|
|
| ^^ help: remove the `()`
|
|
|
|
error: unneeded `()`
|
|
--> $DIR/unused_unit.rs:50:11
|
|
|
|
|
50 | return();
|
|
| ^^ help: remove the `()`
|
|
|
|
error: aborting due to 7 previous errors
|
|
|