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