]> git.proxmox.com Git - rustc.git/blob - src/test/ui/span/missing-unit-argument.stderr
New upstream version 1.23.0+dfsg1
[rustc.git] / src / test / ui / span / missing-unit-argument.stderr
1 error[E0061]: this function takes 1 parameter but 0 parameters were supplied
2 --> $DIR/missing-unit-argument.rs:21:33
3 |
4 21 | let _: Result<(), String> = Ok();
5 | ^^^^
6 help: expected the unit value `()`; create it with empty parentheses
7 |
8 21 | let _: Result<(), String> = Ok(());
9 | ^^
10
11 error[E0061]: this function takes 2 parameters but 0 parameters were supplied
12 --> $DIR/missing-unit-argument.rs:22:5
13 |
14 11 | fn foo(():(), ():()) {}
15 | ----------------------- defined here
16 ...
17 22 | foo();
18 | ^^^^^ expected 2 parameters
19
20 error[E0061]: this function takes 2 parameters but 1 parameter was supplied
21 --> $DIR/missing-unit-argument.rs:23:9
22 |
23 11 | fn foo(():(), ():()) {}
24 | ----------------------- defined here
25 ...
26 23 | foo(());
27 | ^^ expected 2 parameters
28
29 error[E0061]: this function takes 1 parameter but 0 parameters were supplied
30 --> $DIR/missing-unit-argument.rs:24:5
31 |
32 12 | fn bar(():()) {}
33 | ---------------- defined here
34 ...
35 24 | bar();
36 | ^^^^^
37 help: expected the unit value `()`; create it with empty parentheses
38 |
39 24 | bar(());
40 | ^^
41
42 error[E0061]: this function takes 1 parameter but 0 parameters were supplied
43 --> $DIR/missing-unit-argument.rs:25:7
44 |
45 16 | fn baz(self, (): ()) { }
46 | ------------------------ defined here
47 ...
48 25 | S.baz();
49 | ^^^
50 help: expected the unit value `()`; create it with empty parentheses
51 |
52 25 | S.baz(());
53 | ^^
54
55 error[E0061]: this function takes 1 parameter but 0 parameters were supplied
56 --> $DIR/missing-unit-argument.rs:26:7
57 |
58 17 | fn generic<T>(self, _: T) { }
59 | ----------------------------- defined here
60 ...
61 26 | S.generic::<()>();
62 | ^^^^^^^
63 help: expected the unit value `()`; create it with empty parentheses
64 |
65 26 | S.generic::<()>(());
66 | ^^
67
68 error: aborting due to 6 previous errors
69