]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/missing-unit-argument.stderr
Auto merge of #86211 - tlyu:option-result-overviews, r=joshtriplett
[rust.git] / src / test / ui / span / missing-unit-argument.stderr
1 error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
2   --> $DIR/missing-unit-argument.rs:11:33
3    |
4 LL |     let _: Result<(), String> = Ok();
5    |                                 ^^-- supplied 0 arguments
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 arguments but 0 arguments were supplied
13   --> $DIR/missing-unit-argument.rs:12:5
14    |
15 LL |     foo();
16    |     ^^^-- supplied 0 arguments
17    |     |
18    |     expected 2 arguments
19    |
20 note: function defined here
21   --> $DIR/missing-unit-argument.rs:1:4
22    |
23 LL | fn foo(():(), ():()) {}
24    |    ^^^ -----  -----
25
26 error[E0061]: this function takes 2 arguments but 1 argument was supplied
27   --> $DIR/missing-unit-argument.rs:13:5
28    |
29 LL |     foo(());
30    |     ^^^ -- supplied 1 argument
31    |     |
32    |     expected 2 arguments
33    |
34 note: function defined here
35   --> $DIR/missing-unit-argument.rs:1:4
36    |
37 LL | fn foo(():(), ():()) {}
38    |    ^^^ -----  -----
39
40 error[E0061]: this function takes 1 argument but 0 arguments were supplied
41   --> $DIR/missing-unit-argument.rs:14:5
42    |
43 LL |     bar();
44    |     ^^^-- supplied 0 arguments
45    |
46 note: function defined here
47   --> $DIR/missing-unit-argument.rs:2:4
48    |
49 LL | fn bar(():()) {}
50    |    ^^^ -----
51 help: expected the unit value `()`; create it with empty parentheses
52    |
53 LL |     bar(());
54    |         ^^
55
56 error[E0061]: this function takes 1 argument but 0 arguments were supplied
57   --> $DIR/missing-unit-argument.rs:15:7
58    |
59 LL |     S.baz();
60    |       ^^^- supplied 0 arguments
61    |
62 note: associated function defined here
63   --> $DIR/missing-unit-argument.rs:6:8
64    |
65 LL |     fn baz(self, (): ()) { }
66    |        ^^^ ----  ------
67 help: expected the unit value `()`; create it with empty parentheses
68    |
69 LL |     S.baz(());
70    |           ^^
71
72 error[E0061]: this function takes 1 argument but 0 arguments were supplied
73   --> $DIR/missing-unit-argument.rs:16:7
74    |
75 LL |     S.generic::<()>();
76    |       ^^^^^^^------ supplied 0 arguments
77    |
78 note: associated function defined here
79   --> $DIR/missing-unit-argument.rs:7:8
80    |
81 LL |     fn generic<T>(self, _: T) { }
82    |        ^^^^^^^    ----  ----
83 help: expected the unit value `()`; create it with empty parentheses
84    |
85 LL |     S.generic::<()>(());
86    |                     ^^
87
88 error: aborting due to 6 previous errors
89
90 For more information about this error, try `rustc --explain E0061`.