2018-09-27 12:10:20 -05:00
|
|
|
error: unneeded unit return type
|
2020-05-12 18:04:16 -05:00
|
|
|
--> $DIR/unused_unit.rs:18:29
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2020-05-12 18:04:16 -05:00
|
|
|
LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
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
|
2020-05-12 18:04:16 -05:00
|
|
|
--> $DIR/unused_unit.rs:19:19
|
|
|
|
|
|
|
|
|
LL | where G: Fn() -> () {
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
|
|
|
--> $DIR/unused_unit.rs:18:59
|
|
|
|
|
|
|
|
|
LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
|
|
|
--> $DIR/unused_unit.rs:20:27
|
|
|
|
|
|
|
|
|
LL | let _y: &dyn Fn() -> () = &f;
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
|
|
|
--> $DIR/unused_unit.rs:27: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
|
2020-05-12 18:04:16 -05:00
|
|
|
--> $DIR/unused_unit.rs:28: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
|
2020-05-12 18:04:16 -05:00
|
|
|
--> $DIR/unused_unit.rs:33:30
|
|
|
|
|
|
|
|
|
LL | fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
|
|
|
--> $DIR/unused_unit.rs:35:20
|
|
|
|
|
|
|
|
|
LL | G: FnMut() -> (),
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
|
|
|
--> $DIR/unused_unit.rs:36:17
|
|
|
|
|
|
|
|
|
LL | H: Fn() -> ();
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
|
|
|
--> $DIR/unused_unit.rs:40:30
|
|
|
|
|
|
|
|
|
LL | fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
|
|
|
--> $DIR/unused_unit.rs:42:20
|
|
|
|
|
|
|
|
|
LL | G: FnMut() -> (),
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
|
|
|
--> $DIR/unused_unit.rs:43:17
|
|
|
|
|
|
|
|
|
LL | H: Fn() -> () {}
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
|
|
|
--> $DIR/unused_unit.rs:46: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
|
2020-05-12 18:04:16 -05:00
|
|
|
--> $DIR/unused_unit.rs:46: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 `()`
|
2020-05-12 18:04:16 -05:00
|
|
|
--> $DIR/unused_unit.rs:56: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 `()`
|
2020-05-12 18:04:16 -05:00
|
|
|
--> $DIR/unused_unit.rs:58: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 `()`
|
|
|
|
|
2020-05-12 18:04:16 -05:00
|
|
|
error: aborting due to 16 previous errors
|
2018-09-27 12:10:20 -05:00
|
|
|
|