rust/tests/ui/unit_arg.stderr

69 lines
1.5 KiB
Plaintext
Raw Normal View History

2018-01-18 16:02:18 -06:00
error: passing a unit value to a function
--> $DIR/unit_arg.rs:25:9
2018-01-18 16:02:18 -06:00
|
25 | 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
|
25 | foo(());
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
--> $DIR/unit_arg.rs:26:9
2018-01-18 16:02:18 -06:00
|
26 | foo({ 1; });
2018-01-18 16:02:18 -06:00
| ^^^^^^
help: if you intended to pass a unit value, use a unit literal instead
|
26 | foo(());
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
--> $DIR/unit_arg.rs:27:9
2018-01-18 16:02:18 -06:00
|
27 | foo(foo(1));
2018-01-18 16:02:18 -06:00
| ^^^^^^
help: if you intended to pass a unit value, use a unit literal instead
|
27 | foo(());
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
--> $DIR/unit_arg.rs:28:9
2018-01-18 16:02:18 -06:00
|
28 | foo({
2018-01-18 16:02:18 -06:00
| _________^
29 | | foo(1);
30 | | foo(2);
31 | | });
2018-01-18 16:02:18 -06:00
| |_____^
help: if you intended to pass a unit value, use a unit literal instead
|
28 | foo(());
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
--> $DIR/unit_arg.rs:32:10
2018-01-18 16:02:18 -06:00
|
32 | foo3({}, 2, 2);
2018-01-18 16:02:18 -06:00
| ^^
help: if you intended to pass a unit value, use a unit literal instead
|
32 | foo3((), 2, 2);
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
--> $DIR/unit_arg.rs:34:11
2018-01-18 16:02:18 -06:00
|
34 | b.bar({ 1; });
2018-01-18 16:02:18 -06:00
| ^^^^^^
help: if you intended to pass a unit value, use a unit literal instead
|
34 | b.bar(());
2018-01-18 16:02:18 -06:00
| ^^
error: aborting due to 6 previous errors