]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr
Rollup merge of #97317 - GuillaumeGomez:gui-settings-text-click, r=jsha
[rust.git] / src / test / ui / type-alias-enum-variants / enum-variant-generic-args.stderr
1 error[E0308]: mismatched types
2   --> $DIR/enum-variant-generic-args.rs:13:25
3    |
4 LL | impl<T> Enum<T> {
5    |      - this type parameter
6 LL |     fn ts_variant() {
7 LL |         Self::TSVariant(());
8    |         --------------- ^^ expected type parameter `T`, found `()`
9    |         |
10    |         arguments to this function are incorrect
11    |
12    = note: expected type parameter `T`
13                    found unit type `()`
14 note: tuple variant defined here
15   --> $DIR/enum-variant-generic-args.rs:7:16
16    |
17 LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
18    |                ^^^^^^^^^
19
20 error[E0109]: type arguments are not allowed for this type
21   --> $DIR/enum-variant-generic-args.rs:15:27
22    |
23 LL |         Self::TSVariant::<()>(());
24    |                           ^^ type argument not allowed
25
26 error[E0109]: type arguments are not allowed for this type
27   --> $DIR/enum-variant-generic-args.rs:17:16
28    |
29 LL |         Self::<()>::TSVariant(());
30    |                ^^ type argument not allowed
31
32 error[E0308]: mismatched types
33   --> $DIR/enum-variant-generic-args.rs:17:31
34    |
35 LL | impl<T> Enum<T> {
36    |      - this type parameter
37 ...
38 LL |         Self::<()>::TSVariant(());
39    |         --------------------- ^^ expected type parameter `T`, found `()`
40    |         |
41    |         arguments to this function are incorrect
42    |
43    = note: expected type parameter `T`
44                    found unit type `()`
45 note: tuple variant defined here
46   --> $DIR/enum-variant-generic-args.rs:7:16
47    |
48 LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
49    |                ^^^^^^^^^
50
51 error[E0109]: type arguments are not allowed for this type
52   --> $DIR/enum-variant-generic-args.rs:20:16
53    |
54 LL |         Self::<()>::TSVariant::<()>(());
55    |                ^^ type argument not allowed
56
57 error[E0109]: type arguments are not allowed for this type
58   --> $DIR/enum-variant-generic-args.rs:20:33
59    |
60 LL |         Self::<()>::TSVariant::<()>(());
61    |                                 ^^ type argument not allowed
62
63 error[E0308]: mismatched types
64   --> $DIR/enum-variant-generic-args.rs:26:29
65    |
66 LL | impl<T> Enum<T> {
67    |      - this type parameter
68 ...
69 LL |         Self::SVariant { v: () };
70    |                             ^^ expected type parameter `T`, found `()`
71    |
72    = note: expected type parameter `T`
73                    found unit type `()`
74
75 error[E0109]: type arguments are not allowed for this type
76   --> $DIR/enum-variant-generic-args.rs:28:26
77    |
78 LL |         Self::SVariant::<()> { v: () };
79    |                          ^^ type argument not allowed
80
81 error[E0308]: mismatched types
82   --> $DIR/enum-variant-generic-args.rs:28:35
83    |
84 LL | impl<T> Enum<T> {
85    |      - this type parameter
86 ...
87 LL |         Self::SVariant::<()> { v: () };
88    |                                   ^^ expected type parameter `T`, found `()`
89    |
90    = note: expected type parameter `T`
91                    found unit type `()`
92
93 error[E0109]: type arguments are not allowed for this type
94   --> $DIR/enum-variant-generic-args.rs:31:16
95    |
96 LL |         Self::<()>::SVariant { v: () };
97    |                ^^ type argument not allowed
98
99 error[E0308]: mismatched types
100   --> $DIR/enum-variant-generic-args.rs:31:35
101    |
102 LL | impl<T> Enum<T> {
103    |      - this type parameter
104 ...
105 LL |         Self::<()>::SVariant { v: () };
106    |                                   ^^ expected type parameter `T`, found `()`
107    |
108    = note: expected type parameter `T`
109                    found unit type `()`
110
111 error[E0109]: type arguments are not allowed for this type
112   --> $DIR/enum-variant-generic-args.rs:34:16
113    |
114 LL |         Self::<()>::SVariant::<()> { v: () };
115    |                ^^ type argument not allowed
116
117 error[E0109]: type arguments are not allowed for this type
118   --> $DIR/enum-variant-generic-args.rs:34:32
119    |
120 LL |         Self::<()>::SVariant::<()> { v: () };
121    |                                ^^ type argument not allowed
122
123 error[E0308]: mismatched types
124   --> $DIR/enum-variant-generic-args.rs:34:41
125    |
126 LL | impl<T> Enum<T> {
127    |      - this type parameter
128 ...
129 LL |         Self::<()>::SVariant::<()> { v: () };
130    |                                         ^^ expected type parameter `T`, found `()`
131    |
132    = note: expected type parameter `T`
133                    found unit type `()`
134
135 error[E0109]: type arguments are not allowed for this type
136   --> $DIR/enum-variant-generic-args.rs:41:26
137    |
138 LL |         Self::UVariant::<()>;
139    |                          ^^ type argument not allowed
140
141 error[E0109]: type arguments are not allowed for this type
142   --> $DIR/enum-variant-generic-args.rs:43:16
143    |
144 LL |         Self::<()>::UVariant;
145    |                ^^ type argument not allowed
146
147 error[E0109]: type arguments are not allowed for this type
148   --> $DIR/enum-variant-generic-args.rs:45:16
149    |
150 LL |         Self::<()>::UVariant::<()>;
151    |                ^^ type argument not allowed
152
153 error[E0109]: type arguments are not allowed for this type
154   --> $DIR/enum-variant-generic-args.rs:45:32
155    |
156 LL |         Self::<()>::UVariant::<()>;
157    |                                ^^ type argument not allowed
158
159 error[E0109]: type arguments are not allowed for this type
160   --> $DIR/enum-variant-generic-args.rs:54:29
161    |
162 LL |     Enum::<()>::TSVariant::<()>(());
163    |                             ^^ type argument not allowed
164
165 error[E0109]: type arguments are not allowed for this type
166   --> $DIR/enum-variant-generic-args.rs:57:24
167    |
168 LL |     Alias::TSVariant::<()>(());
169    |                        ^^ type argument not allowed
170
171 error[E0109]: type arguments are not allowed for this type
172   --> $DIR/enum-variant-generic-args.rs:59:30
173    |
174 LL |     Alias::<()>::TSVariant::<()>(());
175    |                              ^^ type argument not allowed
176
177 error[E0109]: type arguments are not allowed for this type
178   --> $DIR/enum-variant-generic-args.rs:62:29
179    |
180 LL |     AliasFixed::TSVariant::<()>(());
181    |                             ^^ type argument not allowed
182
183 error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
184   --> $DIR/enum-variant-generic-args.rs:64:5
185    |
186 LL |     AliasFixed::<()>::TSVariant(());
187    |     ^^^^^^^^^^------ help: remove these generics
188    |     |
189    |     expected 0 generic arguments
190    |
191 note: type alias defined here, with 0 generic parameters
192   --> $DIR/enum-variant-generic-args.rs:9:6
193    |
194 LL | type AliasFixed = Enum<()>;
195    |      ^^^^^^^^^^
196
197 error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
198   --> $DIR/enum-variant-generic-args.rs:66:5
199    |
200 LL |     AliasFixed::<()>::TSVariant::<()>(());
201    |     ^^^^^^^^^^------ help: remove these generics
202    |     |
203    |     expected 0 generic arguments
204    |
205 note: type alias defined here, with 0 generic parameters
206   --> $DIR/enum-variant-generic-args.rs:9:6
207    |
208 LL | type AliasFixed = Enum<()>;
209    |      ^^^^^^^^^^
210
211 error[E0109]: type arguments are not allowed for this type
212   --> $DIR/enum-variant-generic-args.rs:66:35
213    |
214 LL |     AliasFixed::<()>::TSVariant::<()>(());
215    |                                   ^^ type argument not allowed
216
217 error[E0109]: type arguments are not allowed for this type
218   --> $DIR/enum-variant-generic-args.rs:72:28
219    |
220 LL |     Enum::<()>::SVariant::<()> { v: () };
221    |                            ^^ type argument not allowed
222
223 error[E0109]: type arguments are not allowed for this type
224   --> $DIR/enum-variant-generic-args.rs:75:23
225    |
226 LL |     Alias::SVariant::<()> { v: () };
227    |                       ^^ type argument not allowed
228
229 error[E0109]: type arguments are not allowed for this type
230   --> $DIR/enum-variant-generic-args.rs:77:29
231    |
232 LL |     Alias::<()>::SVariant::<()> { v: () };
233    |                             ^^ type argument not allowed
234
235 error[E0109]: type arguments are not allowed for this type
236   --> $DIR/enum-variant-generic-args.rs:80:28
237    |
238 LL |     AliasFixed::SVariant::<()> { v: () };
239    |                            ^^ type argument not allowed
240
241 error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
242   --> $DIR/enum-variant-generic-args.rs:82:5
243    |
244 LL |     AliasFixed::<()>::SVariant { v: () };
245    |     ^^^^^^^^^^------ help: remove these generics
246    |     |
247    |     expected 0 generic arguments
248    |
249 note: type alias defined here, with 0 generic parameters
250   --> $DIR/enum-variant-generic-args.rs:9:6
251    |
252 LL | type AliasFixed = Enum<()>;
253    |      ^^^^^^^^^^
254
255 error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
256   --> $DIR/enum-variant-generic-args.rs:84:5
257    |
258 LL |     AliasFixed::<()>::SVariant::<()> { v: () };
259    |     ^^^^^^^^^^------ help: remove these generics
260    |     |
261    |     expected 0 generic arguments
262    |
263 note: type alias defined here, with 0 generic parameters
264   --> $DIR/enum-variant-generic-args.rs:9:6
265    |
266 LL | type AliasFixed = Enum<()>;
267    |      ^^^^^^^^^^
268
269 error[E0109]: type arguments are not allowed for this type
270   --> $DIR/enum-variant-generic-args.rs:84:34
271    |
272 LL |     AliasFixed::<()>::SVariant::<()> { v: () };
273    |                                  ^^ type argument not allowed
274
275 error[E0109]: type arguments are not allowed for this type
276   --> $DIR/enum-variant-generic-args.rs:90:28
277    |
278 LL |     Enum::<()>::UVariant::<()>;
279    |                            ^^ type argument not allowed
280
281 error[E0109]: type arguments are not allowed for this type
282   --> $DIR/enum-variant-generic-args.rs:93:23
283    |
284 LL |     Alias::UVariant::<()>;
285    |                       ^^ type argument not allowed
286
287 error[E0109]: type arguments are not allowed for this type
288   --> $DIR/enum-variant-generic-args.rs:95:29
289    |
290 LL |     Alias::<()>::UVariant::<()>;
291    |                             ^^ type argument not allowed
292
293 error[E0109]: type arguments are not allowed for this type
294   --> $DIR/enum-variant-generic-args.rs:98:28
295    |
296 LL |     AliasFixed::UVariant::<()>;
297    |                            ^^ type argument not allowed
298
299 error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
300   --> $DIR/enum-variant-generic-args.rs:100:5
301    |
302 LL |     AliasFixed::<()>::UVariant;
303    |     ^^^^^^^^^^------ help: remove these generics
304    |     |
305    |     expected 0 generic arguments
306    |
307 note: type alias defined here, with 0 generic parameters
308   --> $DIR/enum-variant-generic-args.rs:9:6
309    |
310 LL | type AliasFixed = Enum<()>;
311    |      ^^^^^^^^^^
312
313 error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
314   --> $DIR/enum-variant-generic-args.rs:102:5
315    |
316 LL |     AliasFixed::<()>::UVariant::<()>;
317    |     ^^^^^^^^^^------ help: remove these generics
318    |     |
319    |     expected 0 generic arguments
320    |
321 note: type alias defined here, with 0 generic parameters
322   --> $DIR/enum-variant-generic-args.rs:9:6
323    |
324 LL | type AliasFixed = Enum<()>;
325    |      ^^^^^^^^^^
326
327 error[E0109]: type arguments are not allowed for this type
328   --> $DIR/enum-variant-generic-args.rs:102:34
329    |
330 LL |     AliasFixed::<()>::UVariant::<()>;
331    |                                  ^^ type argument not allowed
332
333 error: aborting due to 39 previous errors
334
335 Some errors have detailed explanations: E0107, E0109, E0308.
336 For more information about an error, try `rustc --explain E0107`.