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