]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/missing-unit-argument.stderr
Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiser
[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    |                                 ^^-- an argument of type `()` is missing
6    |
7 note: tuple variant defined here
8   --> $SRC_DIR/core/src/result.rs:LL:COL
9    |
10 LL |     Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
11    |     ^^
12 help: provide the argument
13    |
14 LL |     let _: Result<(), String> = Ok(());
15    |                                 ~~~~~~
16
17 error[E0061]: this function takes 2 arguments but 0 arguments were supplied
18   --> $DIR/missing-unit-argument.rs:12:5
19    |
20 LL |     foo();
21    |     ^^^-- two arguments of type `()` and `()` are missing
22    |
23 note: function defined here
24   --> $DIR/missing-unit-argument.rs:1:4
25    |
26 LL | fn foo(():(), ():()) {}
27    |    ^^^ -----  -----
28 help: provide the arguments
29    |
30 LL |     foo((), ());
31    |     ~~~~~~~~~~~
32
33 error[E0061]: this function takes 2 arguments but 1 argument was supplied
34   --> $DIR/missing-unit-argument.rs:13:5
35    |
36 LL |     foo(());
37    |     ^^^---- an argument of type `()` is missing
38    |
39 note: function defined here
40   --> $DIR/missing-unit-argument.rs:1:4
41    |
42 LL | fn foo(():(), ():()) {}
43    |    ^^^ -----  -----
44 help: provide the argument
45    |
46 LL |     foo((), ());
47    |     ~~~~~~~~~~~
48
49 error[E0061]: this function takes 1 argument but 0 arguments were supplied
50   --> $DIR/missing-unit-argument.rs:14:5
51    |
52 LL |     bar();
53    |     ^^^-- an argument of type `()` is missing
54    |
55 note: function defined here
56   --> $DIR/missing-unit-argument.rs:2:4
57    |
58 LL | fn bar(():()) {}
59    |    ^^^ -----
60 help: provide the argument
61    |
62 LL |     bar(());
63    |     ~~~~~~~
64
65 error[E0061]: this function takes 1 argument but 0 arguments were supplied
66   --> $DIR/missing-unit-argument.rs:15:7
67    |
68 LL |     S.baz();
69    |       ^^^-- an argument of type `()` is missing
70    |
71 note: associated function defined here
72   --> $DIR/missing-unit-argument.rs:6:8
73    |
74 LL |     fn baz(self, (): ()) { }
75    |        ^^^       ------
76 help: provide the argument
77    |
78 LL |     S.baz(());
79    |       ~~~~~~~
80
81 error[E0061]: this function takes 1 argument but 0 arguments were supplied
82   --> $DIR/missing-unit-argument.rs:16:7
83    |
84 LL |     S.generic::<()>();
85    |       ^^^^^^^^^^^^^-- an argument of type `()` is missing
86    |
87 note: associated function defined here
88   --> $DIR/missing-unit-argument.rs:7:8
89    |
90 LL |     fn generic<T>(self, _: T) { }
91    |        ^^^^^^^          ----
92 help: provide the argument
93    |
94 LL |     S.generic::<()>(());
95    |       ~~~~~~~~~~~~~~~~~
96
97 error: aborting due to 6 previous errors
98
99 For more information about this error, try `rustc --explain E0061`.