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