2018-09-27 17:10:20 +00:00
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:20:58
|
2018-09-27 17:10:20 +00:00
|
|
|
|
|
2020-05-17 15:36:26 +00:00
|
|
|
LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
|
2022-04-01 17:18:10 +00:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2018-09-27 17:10:20 +00:00
|
|
|
|
|
2020-01-31 19:21:10 +00:00
|
|
|
note: the lint level is defined here
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:13:9
|
2018-09-27 17:10:20 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | #![deny(clippy::unused_unit)]
|
2018-09-27 17:10:20 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:20:28
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
2022-04-01 17:18:10 +00:00
|
|
|
LL | pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
|
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:21:18
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
2022-04-01 17:18:10 +00:00
|
|
|
LL | where G: Fn() -> () {
|
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:22:26
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | let _y: &dyn Fn() -> () = &f;
|
2020-11-05 13:29:48 +00:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:29:18
|
2018-09-27 17:10:20 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn into(self) -> () {
|
2020-11-05 13:29:48 +00:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2018-09-27 17:10:20 +00:00
|
|
|
|
|
|
|
error: unneeded unit expression
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:30:9
|
2018-09-27 17:10:20 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | ()
|
2018-09-27 17:10:20 +00:00
|
|
|
| ^^ help: remove the final `()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:35:29
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
|
2020-11-05 13:29:48 +00:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:37:19
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | G: FnMut() -> (),
|
2020-11-05 13:29:48 +00:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:38:16
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | H: Fn() -> ();
|
2020-11-05 13:29:48 +00:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:42:29
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
|
2020-11-05 13:29:48 +00:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:44:19
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | G: FnMut() -> (),
|
2020-11-05 13:29:48 +00:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:45:16
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | H: Fn() -> () {}
|
2020-11-05 13:29:48 +00:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:48:17
|
2018-09-27 17:10:20 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn return_unit() -> () { () }
|
2020-11-05 13:29:48 +00:00
|
|
|
| ^^^^^^ help: remove the `-> ()`
|
2018-09-27 17:10:20 +00:00
|
|
|
|
|
|
|
error: unneeded unit expression
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:48:26
|
2018-09-27 17:10:20 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn return_unit() -> () { () }
|
2018-09-27 17:10:20 +00:00
|
|
|
| ^^ help: remove the final `()`
|
|
|
|
|
|
|
|
error: unneeded `()`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:58:14
|
2018-09-27 17:10:20 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | break();
|
2018-09-27 17:10:20 +00:00
|
|
|
| ^^ help: remove the `()`
|
|
|
|
|
|
|
|
error: unneeded `()`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:60:11
|
2018-09-27 17:10:20 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | return();
|
2018-09-27 17:10:20 +00:00
|
|
|
| ^^ help: remove the `()`
|
|
|
|
|
2020-11-05 13:29:48 +00:00
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:77:10
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | fn test()->(){}
|
|
|
|
| ^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:80:11
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | fn test2() ->(){}
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: unneeded unit return type
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/unused_unit.rs:83:11
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | fn test3()-> (){}
|
|
|
|
| ^^^^^ help: remove the `-> ()`
|
|
|
|
|
|
|
|
error: aborting due to 19 previous errors
|
2018-09-27 17:10:20 +00:00
|
|
|
|