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

46 lines
1.3 KiB
Plaintext
Raw Normal View History

error[E0061]: this function takes 1 parameter but 0 parameters were supplied
--> $DIR/missing-unit-argument.rs:15:33
|
15 | let _: Result<(), String> = Ok();
| ^^^^
|
help: expected the unit value `()`. You can create one with a pair of parenthesis
|
15 | let _: Result<(), String> = Ok(());
| ^^
error[E0061]: this function takes 2 parameters but 0 parameters were supplied
--> $DIR/missing-unit-argument.rs:16:5
|
11 | fn foo(():(), ():()) {}
| ----------------------- defined here
...
16 | foo();
| ^^^^^ expected 2 parameters
error[E0061]: this function takes 2 parameters but 1 parameter was supplied
--> $DIR/missing-unit-argument.rs:17:9
|
11 | fn foo(():(), ():()) {}
| ----------------------- defined here
...
17 | foo(());
| ^^ expected 2 parameters
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
--> $DIR/missing-unit-argument.rs:18:5
|
12 | fn bar(():()) {}
| ---------------- defined here
...
18 | bar();
| ^^^^^
|
help: expected the unit value `()`. You can create one with a pair of parenthesis
|
18 | bar(());
| ^^
error: aborting due to 4 previous errors