rust-clippy/tests/ui/unused_unit.stderr

53 lines
1.3 KiB
Text
Raw Normal View History

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