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