1 error[E0308]: mismatched types
2 --> $DIR/enum-variant-generic-args.rs:13:25
5 | - this type parameter
7 LL | Self::TSVariant(());
8 | --------------- ^^ expected type parameter `T`, found `()`
10 | arguments to this enum variant are incorrect
12 = note: expected type parameter `T`
14 note: tuple variant defined here
15 --> $DIR/enum-variant-generic-args.rs:7:16
17 LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
20 error[E0109]: type arguments are not allowed on this type
21 --> $DIR/enum-variant-generic-args.rs:15:27
23 LL | Self::TSVariant::<()>(());
24 | --------- ^^ type argument not allowed
26 | not allowed on this type
28 error[E0109]: type arguments are not allowed on self type
29 --> $DIR/enum-variant-generic-args.rs:17:16
31 LL | Self::<()>::TSVariant(());
32 | ---- ^^ type argument not allowed
34 | not allowed on self type
36 note: `Self` is of type `Enum<T>`
37 --> $DIR/enum-variant-generic-args.rs:7:6
39 LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
40 | ^^^^ `Self` corresponds to this type
42 LL | impl<T> Enum<T> {
43 | --------------- `Self` is on type `Enum` in this `impl`
44 help: the `Self` type doesn't accept type parameters, use the concrete type's name `Enum` instead if you want to specify its type parameters
46 LL | Enum::<()>::TSVariant(());
49 error[E0308]: mismatched types
50 --> $DIR/enum-variant-generic-args.rs:17:31
52 LL | impl<T> Enum<T> {
53 | - this type parameter
55 LL | Self::<()>::TSVariant(());
56 | --------------------- ^^ expected type parameter `T`, found `()`
58 | arguments to this enum variant are incorrect
60 = note: expected type parameter `T`
62 note: tuple variant defined here
63 --> $DIR/enum-variant-generic-args.rs:7:16
65 LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
68 error[E0109]: type arguments are not allowed on self type
69 --> $DIR/enum-variant-generic-args.rs:20:16
71 LL | Self::<()>::TSVariant::<()>(());
72 | ---- ^^ type argument not allowed
74 | not allowed on self type
76 note: `Self` is of type `Enum<T>`
77 --> $DIR/enum-variant-generic-args.rs:7:6
79 LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
80 | ^^^^ `Self` corresponds to this type
82 LL | impl<T> Enum<T> {
83 | --------------- `Self` is on type `Enum` in this `impl`
84 help: the `Self` type doesn't accept type parameters, use the concrete type's name `Enum` instead if you want to specify its type parameters
86 LL | Enum::<()>::TSVariant::<()>(());
89 error[E0109]: type arguments are not allowed on this type
90 --> $DIR/enum-variant-generic-args.rs:20:33
92 LL | Self::<()>::TSVariant::<()>(());
93 | --------- ^^ type argument not allowed
95 | not allowed on this type
97 error[E0308]: mismatched types
98 --> $DIR/enum-variant-generic-args.rs:26:29
100 LL | impl<T> Enum<T> {
101 | - this type parameter
103 LL | Self::SVariant { v: () };
104 | ^^ expected type parameter `T`, found `()`
106 = note: expected type parameter `T`
109 error[E0109]: type arguments are not allowed on this type
110 --> $DIR/enum-variant-generic-args.rs:28:26
112 LL | Self::SVariant::<()> { v: () };
113 | -------- ^^ type argument not allowed
115 | not allowed on this type
117 = note: enum variants can't have type parameters
118 help: you might have meant to specity type parameters on enum `Enum`
120 LL - Self::SVariant::<()> { v: () };
121 LL + Enum::<()>::SVariant { v: () };
124 error[E0308]: mismatched types
125 --> $DIR/enum-variant-generic-args.rs:28:35
127 LL | impl<T> Enum<T> {
128 | - this type parameter
130 LL | Self::SVariant::<()> { v: () };
131 | ^^ expected type parameter `T`, found `()`
133 = note: expected type parameter `T`
136 error[E0109]: type arguments are not allowed on self type
137 --> $DIR/enum-variant-generic-args.rs:31:16
139 LL | Self::<()>::SVariant { v: () };
140 | ---- ^^ type argument not allowed
142 | not allowed on self type
144 note: `Self` is of type `Enum<T>`
145 --> $DIR/enum-variant-generic-args.rs:7:6
147 LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
148 | ^^^^ `Self` corresponds to this type
150 LL | impl<T> Enum<T> {
151 | --------------- `Self` is on type `Enum` in this `impl`
152 help: the `Self` type doesn't accept type parameters, use the concrete type's name `Enum` instead if you want to specify its type parameters
154 LL | Enum::<()>::SVariant { v: () };
157 error[E0308]: mismatched types
158 --> $DIR/enum-variant-generic-args.rs:31:35
160 LL | impl<T> Enum<T> {
161 | - this type parameter
163 LL | Self::<()>::SVariant { v: () };
164 | ^^ expected type parameter `T`, found `()`
166 = note: expected type parameter `T`
169 error[E0109]: type arguments are not allowed on self type
170 --> $DIR/enum-variant-generic-args.rs:34:16
172 LL | Self::<()>::SVariant::<()> { v: () };
173 | ---- ^^ type argument not allowed
175 | not allowed on self type
177 note: `Self` is of type `Enum<T>`
178 --> $DIR/enum-variant-generic-args.rs:7:6
180 LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
181 | ^^^^ `Self` corresponds to this type
183 LL | impl<T> Enum<T> {
184 | --------------- `Self` is on type `Enum` in this `impl`
185 help: the `Self` type doesn't accept type parameters, use the concrete type's name `Enum` instead if you want to specify its type parameters
187 LL | Enum::<()>::SVariant::<()> { v: () };
190 error[E0109]: type arguments are not allowed on this type
191 --> $DIR/enum-variant-generic-args.rs:34:32
193 LL | Self::<()>::SVariant::<()> { v: () };
194 | -------- ^^ type argument not allowed
196 | not allowed on this type
198 = note: enum variants can't have type parameters
199 help: you might have meant to specity type parameters on enum `Enum`
201 LL - Self::<()>::SVariant::<()> { v: () };
202 LL + Enum::<()>::SVariant { v: () };
205 error[E0308]: mismatched types
206 --> $DIR/enum-variant-generic-args.rs:34:41
208 LL | impl<T> Enum<T> {
209 | - this type parameter
211 LL | Self::<()>::SVariant::<()> { v: () };
212 | ^^ expected type parameter `T`, found `()`
214 = note: expected type parameter `T`
217 error[E0109]: type arguments are not allowed on this type
218 --> $DIR/enum-variant-generic-args.rs:41:26
220 LL | Self::UVariant::<()>;
221 | -------- ^^ type argument not allowed
223 | not allowed on this type
225 error[E0109]: type arguments are not allowed on self type
226 --> $DIR/enum-variant-generic-args.rs:43:16
228 LL | Self::<()>::UVariant;
229 | ---- ^^ type argument not allowed
231 | not allowed on self type
233 note: `Self` is of type `Enum<T>`
234 --> $DIR/enum-variant-generic-args.rs:7:6
236 LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
237 | ^^^^ `Self` corresponds to this type
239 LL | impl<T> Enum<T> {
240 | --------------- `Self` is on type `Enum` in this `impl`
241 help: the `Self` type doesn't accept type parameters, use the concrete type's name `Enum` instead if you want to specify its type parameters
243 LL | Enum::<()>::UVariant;
246 error[E0109]: type arguments are not allowed on self type
247 --> $DIR/enum-variant-generic-args.rs:45:16
249 LL | Self::<()>::UVariant::<()>;
250 | ---- ^^ type argument not allowed
252 | not allowed on self type
254 note: `Self` is of type `Enum<T>`
255 --> $DIR/enum-variant-generic-args.rs:7:6
257 LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
258 | ^^^^ `Self` corresponds to this type
260 LL | impl<T> Enum<T> {
261 | --------------- `Self` is on type `Enum` in this `impl`
262 help: the `Self` type doesn't accept type parameters, use the concrete type's name `Enum` instead if you want to specify its type parameters
264 LL | Enum::<()>::UVariant::<()>;
267 error[E0109]: type arguments are not allowed on this type
268 --> $DIR/enum-variant-generic-args.rs:45:32
270 LL | Self::<()>::UVariant::<()>;
271 | -------- ^^ type argument not allowed
273 | not allowed on this type
275 error[E0109]: type arguments are not allowed on tuple variant `TSVariant`
276 --> $DIR/enum-variant-generic-args.rs:54:29
278 LL | Enum::<()>::TSVariant::<()>(());
279 | --------- ^^ type argument not allowed
281 | not allowed on tuple variant `TSVariant`
283 error[E0109]: type arguments are not allowed on this type
284 --> $DIR/enum-variant-generic-args.rs:57:24
286 LL | Alias::TSVariant::<()>(());
287 | --------- ^^ type argument not allowed
289 | not allowed on this type
291 error[E0109]: type arguments are not allowed on this type
292 --> $DIR/enum-variant-generic-args.rs:59:30
294 LL | Alias::<()>::TSVariant::<()>(());
295 | --------- ^^ type argument not allowed
297 | not allowed on this type
299 error[E0109]: type arguments are not allowed on this type
300 --> $DIR/enum-variant-generic-args.rs:62:29
302 LL | AliasFixed::TSVariant::<()>(());
303 | --------- ^^ type argument not allowed
305 | not allowed on this type
307 error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
308 --> $DIR/enum-variant-generic-args.rs:64:5
310 LL | AliasFixed::<()>::TSVariant(());
311 | ^^^^^^^^^^------ help: remove these generics
313 | expected 0 generic arguments
315 note: type alias defined here, with 0 generic parameters
316 --> $DIR/enum-variant-generic-args.rs:9:6
318 LL | type AliasFixed = Enum<()>;
321 error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
322 --> $DIR/enum-variant-generic-args.rs:66:5
324 LL | AliasFixed::<()>::TSVariant::<()>(());
325 | ^^^^^^^^^^------ help: remove these generics
327 | expected 0 generic arguments
329 note: type alias defined here, with 0 generic parameters
330 --> $DIR/enum-variant-generic-args.rs:9:6
332 LL | type AliasFixed = Enum<()>;
335 error[E0109]: type arguments are not allowed on this type
336 --> $DIR/enum-variant-generic-args.rs:66:35
338 LL | AliasFixed::<()>::TSVariant::<()>(());
339 | --------- ^^ type argument not allowed
341 | not allowed on this type
343 error[E0109]: type arguments are not allowed on variant `SVariant`
344 --> $DIR/enum-variant-generic-args.rs:72:28
346 LL | Enum::<()>::SVariant::<()> { v: () };
347 | -------- ^^ type argument not allowed
349 | not allowed on variant `SVariant`
351 = note: enum variants can't have type parameters
353 error[E0109]: type arguments are not allowed on this type
354 --> $DIR/enum-variant-generic-args.rs:75:23
356 LL | Alias::SVariant::<()> { v: () };
357 | -------- ^^ type argument not allowed
359 | not allowed on this type
361 = note: enum variants can't have type parameters
362 help: you might have meant to specity type parameters on enum `Enum`
364 LL - Alias::SVariant::<()> { v: () };
365 LL + Alias::<()>::SVariant { v: () };
368 error[E0109]: type arguments are not allowed on this type
369 --> $DIR/enum-variant-generic-args.rs:77:29
371 LL | Alias::<()>::SVariant::<()> { v: () };
372 | -------- ^^ type argument not allowed
374 | not allowed on this type
376 = note: enum variants can't have type parameters
377 help: you might have meant to specity type parameters on enum `Enum`
379 LL - Alias::<()>::SVariant::<()> { v: () };
380 LL + Alias::<()>::SVariant { v: () };
383 error[E0109]: type arguments are not allowed on this type
384 --> $DIR/enum-variant-generic-args.rs:80:28
386 LL | AliasFixed::SVariant::<()> { v: () };
387 | -------- ^^ type argument not allowed
389 | not allowed on this type
391 = note: enum variants can't have type parameters
392 help: you might have meant to specity type parameters on enum `Enum`
394 LL - AliasFixed::SVariant::<()> { v: () };
395 LL + AliasFixed::<()>::SVariant { v: () };
398 error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
399 --> $DIR/enum-variant-generic-args.rs:82:5
401 LL | AliasFixed::<()>::SVariant { v: () };
402 | ^^^^^^^^^^------ help: remove these generics
404 | expected 0 generic arguments
406 note: type alias defined here, with 0 generic parameters
407 --> $DIR/enum-variant-generic-args.rs:9:6
409 LL | type AliasFixed = Enum<()>;
412 error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
413 --> $DIR/enum-variant-generic-args.rs:84:5
415 LL | AliasFixed::<()>::SVariant::<()> { v: () };
416 | ^^^^^^^^^^------ help: remove these generics
418 | expected 0 generic arguments
420 note: type alias defined here, with 0 generic parameters
421 --> $DIR/enum-variant-generic-args.rs:9:6
423 LL | type AliasFixed = Enum<()>;
426 error[E0109]: type arguments are not allowed on this type
427 --> $DIR/enum-variant-generic-args.rs:84:34
429 LL | AliasFixed::<()>::SVariant::<()> { v: () };
430 | -------- ^^ type argument not allowed
432 | not allowed on this type
434 = note: enum variants can't have type parameters
435 help: you might have meant to specity type parameters on enum `Enum`
437 LL - AliasFixed::<()>::SVariant::<()> { v: () };
438 LL + AliasFixed::<()>::SVariant { v: () };
441 error[E0109]: type arguments are not allowed on unit variant `UVariant`
442 --> $DIR/enum-variant-generic-args.rs:90:28
444 LL | Enum::<()>::UVariant::<()>;
445 | -------- ^^ type argument not allowed
447 | not allowed on unit variant `UVariant`
449 error[E0109]: type arguments are not allowed on this type
450 --> $DIR/enum-variant-generic-args.rs:93:23
452 LL | Alias::UVariant::<()>;
453 | -------- ^^ type argument not allowed
455 | not allowed on this type
457 error[E0109]: type arguments are not allowed on this type
458 --> $DIR/enum-variant-generic-args.rs:95:29
460 LL | Alias::<()>::UVariant::<()>;
461 | -------- ^^ type argument not allowed
463 | not allowed on this type
465 error[E0109]: type arguments are not allowed on this type
466 --> $DIR/enum-variant-generic-args.rs:98:28
468 LL | AliasFixed::UVariant::<()>;
469 | -------- ^^ type argument not allowed
471 | not allowed on this type
473 error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
474 --> $DIR/enum-variant-generic-args.rs:100:5
476 LL | AliasFixed::<()>::UVariant;
477 | ^^^^^^^^^^------ help: remove these generics
479 | expected 0 generic arguments
481 note: type alias defined here, with 0 generic parameters
482 --> $DIR/enum-variant-generic-args.rs:9:6
484 LL | type AliasFixed = Enum<()>;
487 error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
488 --> $DIR/enum-variant-generic-args.rs:102:5
490 LL | AliasFixed::<()>::UVariant::<()>;
491 | ^^^^^^^^^^------ help: remove these generics
493 | expected 0 generic arguments
495 note: type alias defined here, with 0 generic parameters
496 --> $DIR/enum-variant-generic-args.rs:9:6
498 LL | type AliasFixed = Enum<()>;
501 error[E0109]: type arguments are not allowed on this type
502 --> $DIR/enum-variant-generic-args.rs:102:34
504 LL | AliasFixed::<()>::UVariant::<()>;
505 | -------- ^^ type argument not allowed
507 | not allowed on this type
509 error: aborting due to 39 previous errors
511 Some errors have detailed explanations: E0107, E0109, E0308.
512 For more information about an error, try `rustc --explain E0107`.