2018-09-27 19:10:20 +02:00
|
|
|
error: unneeded unit return type
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/unused_unit.rs:15:59
|
2018-09-27 19:10:20 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) ->
|
2018-09-27 19:10:20 +02:00
|
|
|
| ___________________________________________________________^
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | | ()
|
2018-09-27 19:10:20 +02:00
|
|
|
| |__________^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/unused_unit.rs:9:9
|
2018-09-27 19:10:20 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | #![deny(clippy::unused_unit)]
|
2018-09-27 19:10:20 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/unused_unit.rs:25:19
|
2018-09-27 19:10:20 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | fn into(self) -> () {
|
2018-09-27 19:10:20 +02:00
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit expression
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/unused_unit.rs:26:9
|
2018-09-27 19:10:20 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | ()
|
2018-09-27 19:10:20 +02:00
|
|
|
| ^^ help: remove the final `()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/unused_unit.rs:30:18
|
2018-09-27 19:10:20 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | fn return_unit() -> () { () }
|
2018-09-27 19:10:20 +02:00
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit expression
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/unused_unit.rs:30:26
|
2018-09-27 19:10:20 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | fn return_unit() -> () { () }
|
2018-09-27 19:10:20 +02:00
|
|
|
| ^^ help: remove the final `()`
|
|
|
|
|
|
|
|
error: unneeded `()`
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/unused_unit.rs:37:14
|
2018-09-27 19:10:20 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | break();
|
2018-09-27 19:10:20 +02:00
|
|
|
| ^^ help: remove the `()`
|
|
|
|
|
|
|
|
error: unneeded `()`
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/unused_unit.rs:39:11
|
2018-09-27 19:10:20 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | return();
|
2018-09-27 19:10:20 +02:00
|
|
|
| ^^ help: remove the `()`
|
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|