2018-09-27 12:10:20 -05:00
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:19:28
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2020-05-17 10:36:26 -05:00
|
|
|
LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
|
2020-11-05 07:29:48 -06:00
|
|
|
| ^^^^^^ 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
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:20:18
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | where G: Fn() -> () {
|
2020-11-05 07:29:48 -06:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:19:58
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
|
2020-11-05 07:29:48 -06:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:21:26
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | let _y: &dyn Fn() -> () = &f;
|
2020-11-05 07:29:48 -06:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:28:18
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn into(self) -> () {
|
2020-11-05 07:29:48 -06:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
|
|
error: unneeded unit expression
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:29: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
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:34:29
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
|
2020-11-05 07:29:48 -06:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:36:19
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | G: FnMut() -> (),
|
2020-11-05 07:29:48 -06:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:37:16
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | H: Fn() -> ();
|
2020-11-05 07:29:48 -06:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:41:29
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
|
2020-11-05 07:29:48 -06:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:43:19
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | G: FnMut() -> (),
|
2020-11-05 07:29:48 -06:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:44:16
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | H: Fn() -> () {}
|
2020-11-05 07:29:48 -06:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:47:17
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn return_unit() -> () { () }
|
2020-11-05 07:29:48 -06:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2018-09-27 12:10:20 -05:00
|
|
|
|
|
|
|
error: unneeded unit expression
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:47: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 `()`
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:57: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 `()`
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:59: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-11-05 07:29:48 -06:00
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:76:10
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | fn test()->(){}
|
|
|
|
| ^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:79:11
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | fn test2() ->(){}
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
2021-01-02 09:29:43 -06:00
|
|
|
--> $DIR/unused_unit.rs:82:11
|
2020-11-05 07:29:48 -06:00
|
|
|
|
|
|
|
|
LL | fn test3()-> (){}
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: aborting due to 19 previous errors
|
2018-09-27 12:10:20 -05:00
|
|
|
|