rust/tests/ui/unit_arg.stderr

80 lines
1.6 KiB
Plaintext
Raw Normal View History

2018-01-18 16:02:18 -06:00
error: passing a unit value to a function
2019-01-13 12:59:00 -06:00
--> $DIR/unit_arg.rs:24:9
2018-01-18 16:02:18 -06:00
|
2018-12-27 09:57:55 -06:00
LL | foo({});
2018-01-18 16:02:18 -06:00
| ^^
|
= note: `-D clippy::unit-arg` implied by `-D warnings`
2018-01-18 16:02:18 -06:00
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-27 09:57:55 -06:00
LL | foo(());
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
2019-01-13 12:59:00 -06:00
--> $DIR/unit_arg.rs:25:9
2018-01-18 16:02:18 -06:00
|
2018-12-27 09:57:55 -06:00
LL | foo({
2018-12-09 23:27:19 -06:00
| _________^
2018-12-27 09:57:55 -06:00
LL | | 1;
LL | | });
2018-12-09 23:27:19 -06:00
| |_____^
2019-10-26 14:53:42 -05:00
|
2018-01-18 16:02:18 -06:00
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-27 09:57:55 -06:00
LL | foo(());
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
2019-01-13 12:59:00 -06:00
--> $DIR/unit_arg.rs:28:9
2018-01-18 16:02:18 -06:00
|
2018-12-27 09:57:55 -06:00
LL | foo(foo(1));
2018-01-18 16:02:18 -06:00
| ^^^^^^
2019-10-26 14:53:42 -05:00
|
2018-01-18 16:02:18 -06:00
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-27 09:57:55 -06:00
LL | foo(());
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
2019-01-13 12:59:00 -06:00
--> $DIR/unit_arg.rs:29:9
2018-01-18 16:02:18 -06:00
|
2018-12-27 09:57:55 -06:00
LL | foo({
2018-01-18 16:02:18 -06:00
| _________^
2018-12-27 09:57:55 -06:00
LL | | foo(1);
LL | | foo(2);
LL | | });
2018-01-18 16:02:18 -06:00
| |_____^
2019-10-26 14:53:42 -05:00
|
2018-01-18 16:02:18 -06:00
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-27 09:57:55 -06:00
LL | foo(());
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
2019-01-13 12:59:00 -06:00
--> $DIR/unit_arg.rs:33:10
2018-01-18 16:02:18 -06:00
|
2018-12-27 09:57:55 -06:00
LL | foo3({}, 2, 2);
2018-01-18 16:02:18 -06:00
| ^^
2019-10-26 14:53:42 -05:00
|
2018-01-18 16:02:18 -06:00
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-27 09:57:55 -06:00
LL | foo3((), 2, 2);
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
2019-01-13 12:59:00 -06:00
--> $DIR/unit_arg.rs:35:11
2018-01-18 16:02:18 -06:00
|
2018-12-27 09:57:55 -06:00
LL | b.bar({
2018-12-09 23:27:19 -06:00
| ___________^
2018-12-27 09:57:55 -06:00
LL | | 1;
LL | | });
2018-12-09 23:27:19 -06:00
| |_____^
2019-10-26 14:53:42 -05:00
|
2018-01-18 16:02:18 -06:00
help: if you intended to pass a unit value, use a unit literal instead
|
2018-12-27 09:57:55 -06:00
LL | b.bar(());
2018-01-18 16:02:18 -06:00
| ^^
error: aborting due to 6 previous errors