rust/tests/ui/unused_unit.stderr
2019-03-07 08:13:59 +02:00

53 lines
1.3 KiB
Plaintext

error: unneeded unit return type
--> $DIR/unused_unit.rs:17: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:9:9
|
LL | #![deny(clippy::unused_unit)]
| ^^^^^^^^^^^^^^^^^^^
error: unneeded unit return type
--> $DIR/unused_unit.rs:27:19
|
LL | fn into(self) -> () {
| ^^^^^ help: remove the `-> ()`
error: unneeded unit expression
--> $DIR/unused_unit.rs:28:9
|
LL | ()
| ^^ help: remove the final `()`
error: unneeded unit return type
--> $DIR/unused_unit.rs:32:18
|
LL | fn return_unit() -> () { () }
| ^^^^^ help: remove the `-> ()`
error: unneeded unit expression
--> $DIR/unused_unit.rs:32:26
|
LL | fn return_unit() -> () { () }
| ^^ help: remove the final `()`
error: unneeded `()`
--> $DIR/unused_unit.rs:39:14
|
LL | break();
| ^^ help: remove the `()`
error: unneeded `()`
--> $DIR/unused_unit.rs:41:11
|
LL | return();
| ^^ help: remove the `()`
error: aborting due to 7 previous errors