rust-clippy/tests/ui/unit_arg.stderr

75 lines
1.6 KiB
Text
Raw Normal View History

2018-01-18 22:02:18 +00:00
error: passing a unit value to a function
2018-12-10 05:27:19 +00:00
--> $DIR/unit_arg.rs:32:9
2018-01-18 22:02:18 +00:00
|
2018-12-10 05:27:19 +00:00
32 | foo({});
2018-01-18 22:02:18 +00:00
| ^^
|
= note: `-D clippy::unit-arg` implied by `-D warnings`
2018-01-18 22:02:18 +00:00
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-10 05:27:19 +00:00
32 | foo(());
2018-01-18 22:02:18 +00:00
| ^^
error: passing a unit value to a function
2018-12-10 05:27:19 +00:00
--> $DIR/unit_arg.rs:33:9
2018-01-18 22:02:18 +00:00
|
2018-12-10 05:27:19 +00:00
33 | foo({
| _________^
34 | | 1;
35 | | });
| |_____^
2018-01-18 22:02:18 +00:00
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-10 05:27:19 +00:00
33 | foo(());
2018-01-18 22:02:18 +00:00
| ^^
error: passing a unit value to a function
2018-12-10 05:27:19 +00:00
--> $DIR/unit_arg.rs:36:9
2018-01-18 22:02:18 +00:00
|
2018-12-10 05:27:19 +00:00
36 | foo(foo(1));
2018-01-18 22:02:18 +00:00
| ^^^^^^
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-10 05:27:19 +00:00
36 | foo(());
2018-01-18 22:02:18 +00:00
| ^^
error: passing a unit value to a function
2018-12-10 05:27:19 +00:00
--> $DIR/unit_arg.rs:37:9
2018-01-18 22:02:18 +00:00
|
2018-12-10 05:27:19 +00:00
37 | foo({
2018-01-18 22:02:18 +00:00
| _________^
2018-12-10 05:27:19 +00:00
38 | | foo(1);
39 | | foo(2);
40 | | });
2018-01-18 22:02:18 +00:00
| |_____^
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-10 05:27:19 +00:00
37 | foo(());
2018-01-18 22:02:18 +00:00
| ^^
error: passing a unit value to a function
2018-12-10 05:27:19 +00:00
--> $DIR/unit_arg.rs:41:10
2018-01-18 22:02:18 +00:00
|
2018-12-10 05:27:19 +00:00
41 | foo3({}, 2, 2);
2018-01-18 22:02:18 +00:00
| ^^
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-10 05:27:19 +00:00
41 | foo3((), 2, 2);
2018-01-18 22:02:18 +00:00
| ^^
error: passing a unit value to a function
2018-12-10 05:27:19 +00:00
--> $DIR/unit_arg.rs:43:11
2018-01-18 22:02:18 +00:00
|
2018-12-10 05:27:19 +00:00
43 | b.bar({
| ___________^
44 | | 1;
45 | | });
| |_____^
2018-01-18 22:02:18 +00:00
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-10 05:27:19 +00:00
43 | b.bar(());
2018-01-18 22:02:18 +00:00
| ^^
error: aborting due to 6 previous errors