2018-09-27 12:10:20 -05:00
|
|
|
error: unneeded unit return type
|
2019-08-24 14:42:39 -05:00
|
|
|
--> $DIR/unused_unit.rs:19:59
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) ->
|
2018-09-27 12:10:20 -05:00
|
|
|
| ___________________________________________________________^
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | | ()
|
2018-09-27 12:10:20 -05:00
|
|
|
| |__________^ help: remove the `-> ()`
|
|
|
|
|
|
2020-01-31 13:21:10 -06:00
|
|
|
note: the lint level is defined here
|
2019-03-07 00:21:41 -06:00
|
|
|
--> $DIR/unused_unit.rs:12:9
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | #![deny(clippy::unused_unit)]
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
2019-08-24 14:42:39 -05:00
|
|
|
--> $DIR/unused_unit.rs:29:19
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn into(self) -> () {
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit expression
|
2019-08-24 14:42:39 -05:00
|
|
|
--> $DIR/unused_unit.rs:30:9
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | ()
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^ help: remove the final `()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
2019-08-24 14:42:39 -05:00
|
|
|
--> $DIR/unused_unit.rs:34:18
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn return_unit() -> () { () }
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit expression
|
2019-08-24 14:42:39 -05:00
|
|
|
--> $DIR/unused_unit.rs:34:26
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn return_unit() -> () { () }
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^ help: remove the final `()`
|
|
|
|
|
|
|
|
error: unneeded `()`
|
2019-10-02 15:48:19 -05:00
|
|
|
--> $DIR/unused_unit.rs:44:14
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | break();
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^ help: remove the `()`
|
|
|
|
|
|
|
|
error: unneeded `()`
|
2019-10-02 15:48:19 -05:00
|
|
|
--> $DIR/unused_unit.rs:46:11
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | return();
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^ help: remove the `()`
|
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|