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-27 15:57:55 +00:00
LL | 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-27 15:57:55 +00:00
LL | 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-27 15:57:55 +00:00
LL | foo({
2018-12-10 05:27:19 +00:00
| _________^
2018-12-27 15:57:55 +00:00
LL | | 1;
LL | | });
2018-12-10 05:27:19 +00:00
| |_____^
2018-01-18 22:02:18 +00:00
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-27 15:57:55 +00:00
LL | 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-27 15:57:55 +00:00
LL | 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-27 15:57:55 +00:00
LL | 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-27 15:57:55 +00:00
LL | foo({
2018-01-18 22:02:18 +00:00
| _________^
2018-12-27 15:57:55 +00:00
LL | | foo(1);
LL | | foo(2);
LL | | });
2018-01-18 22:02:18 +00:00
| |_____^
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-27 15:57:55 +00:00
LL | 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-27 15:57:55 +00:00
LL | 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-27 15:57:55 +00:00
LL | 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-27 15:57:55 +00:00
LL | b.bar({
2018-12-10 05:27:19 +00:00
| ___________^
2018-12-27 15:57:55 +00:00
LL | | 1;
LL | | });
2018-12-10 05:27:19 +00:00
| |_____^
2018-01-18 22:02:18 +00:00
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-27 15:57:55 +00:00
LL | b.bar(());
2018-01-18 22:02:18 +00:00
| ^^
error: aborting due to 6 previous errors