2018-09-27 12:10:20 -05:00
|
|
|
error: unneeded unit return type
|
2018-12-09 10:17:58 -06:00
|
|
|
--> $DIR/unused_unit.rs:25:59
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-09 10:17:58 -06:00
|
|
|
25 | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) ->
|
2018-09-27 12:10:20 -05:00
|
|
|
| ___________________________________________________________^
|
2018-12-09 10:17:58 -06:00
|
|
|
26 | | ()
|
2018-09-27 12:10:20 -05:00
|
|
|
| |__________^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
2018-12-09 10:17:58 -06:00
|
|
|
--> $DIR/unused_unit.rs:19:9
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-09 10:17:58 -06:00
|
|
|
19 | #![deny(clippy::unused_unit)]
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
2018-12-09 10:17:58 -06:00
|
|
|
--> $DIR/unused_unit.rs:35:19
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-09 10:17:58 -06:00
|
|
|
35 | fn into(self) -> () {
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit expression
|
2018-12-09 10:17:58 -06:00
|
|
|
--> $DIR/unused_unit.rs:36:9
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-09 10:17:58 -06:00
|
|
|
36 | ()
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^ help: remove the final `()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
2018-12-09 10:17:58 -06:00
|
|
|
--> $DIR/unused_unit.rs:40:18
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-09 10:17:58 -06:00
|
|
|
40 | fn return_unit() -> () { () }
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit expression
|
2018-12-09 10:17:58 -06:00
|
|
|
--> $DIR/unused_unit.rs:40:26
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-09 10:17:58 -06:00
|
|
|
40 | fn return_unit() -> () { () }
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^ help: remove the final `()`
|
|
|
|
|
|
|
|
error: unneeded `()`
|
2018-12-09 10:17:58 -06:00
|
|
|
--> $DIR/unused_unit.rs:47:14
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-09 10:17:58 -06:00
|
|
|
47 | break();
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^ help: remove the `()`
|
|
|
|
|
|
|
|
error: unneeded `()`
|
2018-12-09 10:17:58 -06:00
|
|
|
--> $DIR/unused_unit.rs:49:11
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-09 10:17:58 -06:00
|
|
|
49 | return();
|
2018-09-27 12:10:20 -05:00
|
|
|
| ^^ help: remove the `()`
|
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|