rust/tests/ui/unit_arg.stderr

75 lines
1.6 KiB
Plaintext
Raw Normal View History

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