]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/struct-enum-wrong-args.stderr
Rollup merge of #106958 - jyn514:labels, r=m-ou-se
[rust.git] / tests / ui / typeck / struct-enum-wrong-args.stderr
1 error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied
2   --> $DIR/struct-enum-wrong-args.rs:6:13
3    |
4 LL |     let _ = Some(3, 2);
5    |             ^^^^    - argument of type `{integer}` unexpected
6    |
7 note: tuple variant defined here
8   --> $SRC_DIR/core/src/option.rs:LL:COL
9 help: remove the extra argument
10    |
11 LL |     let _ = Some(3);
12    |                 ~~~
13
14 error[E0061]: this enum variant takes 1 argument but 3 arguments were supplied
15   --> $DIR/struct-enum-wrong-args.rs:7:13
16    |
17 LL |     let _ = Ok(3, 6, 2);
18    |             ^^    -  - argument of type `{integer}` unexpected
19    |                   |
20    |                   argument of type `{integer}` unexpected
21    |
22 note: tuple variant defined here
23   --> $SRC_DIR/core/src/result.rs:LL:COL
24 help: remove the extra arguments
25    |
26 LL |     let _ = Ok(3);
27    |               ~~~
28
29 error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
30   --> $DIR/struct-enum-wrong-args.rs:8:13
31    |
32 LL |     let _ = Ok();
33    |             ^^-- an argument is missing
34    |
35 note: tuple variant defined here
36   --> $SRC_DIR/core/src/result.rs:LL:COL
37 help: provide the argument
38    |
39 LL |     let _ = Ok(/* value */);
40    |               ~~~~~~~~~~~~~
41
42 error[E0061]: this struct takes 1 argument but 0 arguments were supplied
43   --> $DIR/struct-enum-wrong-args.rs:9:13
44    |
45 LL |     let _ = Wrapper();
46    |             ^^^^^^^-- an argument of type `i32` is missing
47    |
48 note: tuple struct defined here
49   --> $DIR/struct-enum-wrong-args.rs:2:8
50    |
51 LL | struct Wrapper(i32);
52    |        ^^^^^^^
53 help: provide the argument
54    |
55 LL |     let _ = Wrapper(/* i32 */);
56    |                    ~~~~~~~~~~~
57
58 error[E0061]: this struct takes 1 argument but 2 arguments were supplied
59   --> $DIR/struct-enum-wrong-args.rs:10:13
60    |
61 LL |     let _ = Wrapper(5, 2);
62    |             ^^^^^^^    - argument of type `{integer}` unexpected
63    |
64 note: tuple struct defined here
65   --> $DIR/struct-enum-wrong-args.rs:2:8
66    |
67 LL | struct Wrapper(i32);
68    |        ^^^^^^^
69 help: remove the extra argument
70    |
71 LL |     let _ = Wrapper(5);
72    |                    ~~~
73
74 error[E0061]: this struct takes 2 arguments but 0 arguments were supplied
75   --> $DIR/struct-enum-wrong-args.rs:11:13
76    |
77 LL |     let _ = DoubleWrapper();
78    |             ^^^^^^^^^^^^^-- two arguments of type `i32` and `i32` are missing
79    |
80 note: tuple struct defined here
81   --> $DIR/struct-enum-wrong-args.rs:3:8
82    |
83 LL | struct DoubleWrapper(i32, i32);
84    |        ^^^^^^^^^^^^^
85 help: provide the arguments
86    |
87 LL |     let _ = DoubleWrapper(/* i32 */, /* i32 */);
88    |                          ~~~~~~~~~~~~~~~~~~~~~~
89
90 error[E0061]: this struct takes 2 arguments but 1 argument was supplied
91   --> $DIR/struct-enum-wrong-args.rs:12:13
92    |
93 LL |     let _ = DoubleWrapper(5);
94    |             ^^^^^^^^^^^^^--- an argument of type `i32` is missing
95    |
96 note: tuple struct defined here
97   --> $DIR/struct-enum-wrong-args.rs:3:8
98    |
99 LL | struct DoubleWrapper(i32, i32);
100    |        ^^^^^^^^^^^^^
101 help: provide the argument
102    |
103 LL |     let _ = DoubleWrapper(5, /* i32 */);
104    |                          ~~~~~~~~~~~~~~
105
106 error[E0061]: this struct takes 2 arguments but 3 arguments were supplied
107   --> $DIR/struct-enum-wrong-args.rs:13:13
108    |
109 LL |     let _ = DoubleWrapper(5, 2, 7);
110    |             ^^^^^^^^^^^^^       - argument of type `{integer}` unexpected
111    |
112 note: tuple struct defined here
113   --> $DIR/struct-enum-wrong-args.rs:3:8
114    |
115 LL | struct DoubleWrapper(i32, i32);
116    |        ^^^^^^^^^^^^^
117 help: remove the extra argument
118    |
119 LL |     let _ = DoubleWrapper(5, 2);
120    |                          ~~~~~~
121
122 error: aborting due to 8 previous errors
123
124 For more information about this error, try `rustc --explain E0061`.