rust/src/test/ui/span/missing-unit-argument.stderr

70 lines
2.2 KiB
Plaintext
Raw Normal View History

error[E0061]: this function takes 1 parameter but 0 parameters were supplied
2017-10-08 20:13:37 -05:00
--> $DIR/missing-unit-argument.rs:21:33
|
2017-11-20 06:13:27 -06:00
21 | let _: Result<(), String> = Ok(); //~ ERROR this function takes
| ^^^^
2017-10-08 20:13:37 -05:00
help: expected the unit value `()`; create it with empty parentheses
|
2017-11-20 06:13:27 -06:00
21 | let _: Result<(), String> = Ok(()); //~ ERROR this function takes
| ^^
error[E0061]: this function takes 2 parameters but 0 parameters were supplied
2017-10-08 20:13:37 -05:00
--> $DIR/missing-unit-argument.rs:22:5
|
11 | fn foo(():(), ():()) {}
| -------------------- defined here
...
2017-11-20 06:13:27 -06:00
22 | foo(); //~ ERROR this function takes
| ^^^^^ expected 2 parameters
error[E0061]: this function takes 2 parameters but 1 parameter was supplied
--> $DIR/missing-unit-argument.rs:23:5
|
11 | fn foo(():(), ():()) {}
| -------------------- defined here
...
2017-11-20 06:13:27 -06:00
23 | foo(()); //~ ERROR this function takes
| ^^^^^^^ expected 2 parameters
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
2017-10-08 20:13:37 -05:00
--> $DIR/missing-unit-argument.rs:24:5
|
12 | fn bar(():()) {}
| ------------- defined here
...
2017-11-20 06:13:27 -06:00
24 | bar(); //~ ERROR this function takes
| ^^^^^
2017-10-08 20:13:37 -05:00
help: expected the unit value `()`; create it with empty parentheses
|
2017-11-20 06:13:27 -06:00
24 | bar(()); //~ ERROR this function takes
| ^^
2017-10-08 20:13:37 -05:00
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
--> $DIR/missing-unit-argument.rs:25:7
|
16 | fn baz(self, (): ()) { }
| -------------------- defined here
2017-10-08 20:13:37 -05:00
...
2017-11-20 06:13:27 -06:00
25 | S.baz(); //~ ERROR this function takes
2017-10-08 20:13:37 -05:00
| ^^^
help: expected the unit value `()`; create it with empty parentheses
|
2017-11-20 06:13:27 -06:00
25 | S.baz(()); //~ ERROR this function takes
2017-10-08 20:13:37 -05:00
| ^^
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
--> $DIR/missing-unit-argument.rs:26:7
|
17 | fn generic<T>(self, _: T) { }
| ------------------------- defined here
2017-10-08 20:13:37 -05:00
...
2017-11-20 06:13:27 -06:00
26 | S.generic::<()>(); //~ ERROR this function takes
2017-10-08 20:13:37 -05:00
| ^^^^^^^
help: expected the unit value `()`; create it with empty parentheses
|
2017-11-20 06:13:27 -06:00
26 | S.generic::<()>(()); //~ ERROR this function takes
2017-10-08 20:13:37 -05:00
| ^^
error: aborting due to 6 previous errors