mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
957dedb11d
Fixes #4076
52 lines
1.3 KiB
Text
52 lines
1.3 KiB
Text
error: unneeded unit return type
|
|
--> $DIR/unused_unit.rs:19:59
|
|
|
|
|
LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) ->
|
|
| ___________________________________________________________^
|
|
LL | | ()
|
|
| |__________^ help: remove the `-> ()`
|
|
|
|
|
note: lint level defined here
|
|
--> $DIR/unused_unit.rs:12:9
|
|
|
|
|
LL | #![deny(clippy::unused_unit)]
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: unneeded unit return type
|
|
--> $DIR/unused_unit.rs:29:19
|
|
|
|
|
LL | fn into(self) -> () {
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
error: unneeded unit expression
|
|
--> $DIR/unused_unit.rs:30:9
|
|
|
|
|
LL | ()
|
|
| ^^ help: remove the final `()`
|
|
|
|
error: unneeded unit return type
|
|
--> $DIR/unused_unit.rs:34:18
|
|
|
|
|
LL | fn return_unit() -> () { () }
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
error: unneeded unit expression
|
|
--> $DIR/unused_unit.rs:34:26
|
|
|
|
|
LL | fn return_unit() -> () { () }
|
|
| ^^ help: remove the final `()`
|
|
|
|
error: unneeded `()`
|
|
--> $DIR/unused_unit.rs:43:14
|
|
|
|
|
LL | break();
|
|
| ^^ help: remove the `()`
|
|
|
|
error: unneeded `()`
|
|
--> $DIR/unused_unit.rs:45:11
|
|
|
|
|
LL | return();
|
|
| ^^ help: remove the `()`
|
|
|
|
error: aborting due to 7 previous errors
|
|
|