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