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
2018-10-06 11:18:06 -05:00
--> $DIR/unit_arg.rs:35:9
2018-01-18 16:02:18 -06:00
|
2018-10-06 11:18:06 -05:00
35 | 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-10-06 11:18:06 -05:00
35 | foo(());
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
2018-10-06 11:18:06 -05:00
--> $DIR/unit_arg.rs:36:9
2018-01-18 16:02:18 -06:00
|
2018-10-06 11:18:06 -05:00
36 | foo({ 1; });
2018-01-18 16:02:18 -06:00
| ^^^^^^
help: if you intended to pass a unit value, use a unit literal instead
|
2018-10-06 11:18:06 -05:00
36 | foo(());
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
2018-10-06 11:18:06 -05:00
--> $DIR/unit_arg.rs:37:9
2018-01-18 16:02:18 -06:00
|
2018-10-06 11:18:06 -05:00
37 | 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
|
2018-10-06 11:18:06 -05:00
37 | foo(());
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
2018-10-06 11:18:06 -05:00
--> $DIR/unit_arg.rs:38:9
2018-01-18 16:02:18 -06:00
|
2018-10-06 11:18:06 -05:00
38 | foo({
2018-01-18 16:02:18 -06:00
| _________^
2018-10-06 11:18:06 -05:00
39 | | foo(1);
40 | | foo(2);
41 | | });
2018-01-18 16:02:18 -06:00
| |_____^
help: if you intended to pass a unit value, use a unit literal instead
|
2018-10-06 11:18:06 -05:00
38 | foo(());
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
2018-10-06 11:18:06 -05:00
--> $DIR/unit_arg.rs:42:10
2018-01-18 16:02:18 -06:00
|
2018-10-06 11:18:06 -05:00
42 | 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
|
2018-10-06 11:18:06 -05:00
42 | foo3((), 2, 2);
2018-01-18 16:02:18 -06:00
| ^^
error: passing a unit value to a function
2018-10-06 11:18:06 -05:00
--> $DIR/unit_arg.rs:44:11
2018-01-18 16:02:18 -06:00
|
2018-10-06 11:18:06 -05:00
44 | 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
|
2018-10-06 11:18:06 -05:00
44 | b.bar(());
2018-01-18 16:02:18 -06:00
| ^^
error: aborting due to 6 previous errors