]> git.proxmox.com Git - rustc.git/blame - src/test/ui/generics/wrong-number-of-args.stderr
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / generics / wrong-number-of-args.stderr
CommitLineData
5869c6ff
XL
1error[E0106]: missing lifetime specifier
2 --> $DIR/wrong-number-of-args.rs:44:14
3 |
4LL | type A = Ty;
5 | ^^ expected named lifetime parameter
6 |
7help: consider introducing a named lifetime parameter
8 |
9LL | type A<'a> = Ty<'a>;
10 | ^^^^ ^^^^^^
11
12error[E0106]: missing lifetime specifier
13 --> $DIR/wrong-number-of-args.rs:54:17
14 |
15LL | type C = Ty<usize>;
16 | ^ expected named lifetime parameter
17 |
18help: consider introducing a named lifetime parameter
19 |
20LL | type C<'a> = Ty<'a, usize>;
21 | ^^^^ ^^^
22
23error[E0106]: missing lifetime specifier
24 --> $DIR/wrong-number-of-args.rs:100:22
25 |
26LL | type B = Box<dyn GenericLifetime>;
27 | ^^^^^^^^^^^^^^^ expected named lifetime parameter
28 |
29help: consider introducing a named lifetime parameter
30 |
31LL | type B<'a> = Box<dyn GenericLifetime<'a>>;
32 | ^^^^ ^^^^^^^^^^^^^^^^^^^
33
34error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
35 --> $DIR/wrong-number-of-args.rs:6:14
36 |
37LL | type B = Ty<'static>;
38 | ^^--------- help: remove these generics
39 | |
40 | expected 0 lifetime arguments
41 |
42note: struct defined here, with 0 lifetime parameters
43 --> $DIR/wrong-number-of-args.rs:2:12
44 |
45LL | struct Ty;
46 | ^^
47
48error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
49 --> $DIR/wrong-number-of-args.rs:10:14
50 |
51LL | type C = Ty<'static, usize>;
52 | ^^ --------- help: remove this lifetime argument
53 | |
54 | expected 0 lifetime arguments
55 |
56note: struct defined here, with 0 lifetime parameters
57 --> $DIR/wrong-number-of-args.rs:2:12
58 |
59LL | struct Ty;
60 | ^^
61
62error[E0107]: this struct takes 0 type arguments but 1 type argument was supplied
63 --> $DIR/wrong-number-of-args.rs:10:14
64 |
65LL | type C = Ty<'static, usize>;
66 | ^^ ------- help: remove this type argument
67 | |
68 | expected 0 type arguments
69 |
70note: struct defined here, with 0 type parameters
71 --> $DIR/wrong-number-of-args.rs:2:12
72 |
73LL | struct Ty;
74 | ^^
75
76error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
77 --> $DIR/wrong-number-of-args.rs:16:14
78 |
79LL | type D = Ty<'static, usize, { 0 }>;
80 | ^^ --------- help: remove this lifetime argument
81 | |
82 | expected 0 lifetime arguments
83 |
84note: struct defined here, with 0 lifetime parameters
85 --> $DIR/wrong-number-of-args.rs:2:12
86 |
87LL | struct Ty;
88 | ^^
89
90error[E0107]: this struct takes 0 generic arguments but 2 generic arguments were supplied
91 --> $DIR/wrong-number-of-args.rs:16:14
92 |
93LL | type D = Ty<'static, usize, { 0 }>;
94 | ^^ -------------- help: remove these generic arguments
95 | |
96 | expected 0 generic arguments
97 |
98note: struct defined here, with 0 generic parameters
99 --> $DIR/wrong-number-of-args.rs:2:12
100 |
101LL | struct Ty;
102 | ^^
103
104error[E0107]: missing generics for struct `type_and_type::Ty`
105 --> $DIR/wrong-number-of-args.rs:26:14
106 |
107LL | type A = Ty;
108 | ^^ expected 2 type arguments
109 |
110note: struct defined here, with 2 type parameters: `A`, `B`
111 --> $DIR/wrong-number-of-args.rs:24:12
112 |
113LL | struct Ty<A, B>;
114 | ^^ - -
115help: use angle brackets to add missing type arguments
116 |
117LL | type A = Ty<A, B>;
118 | ^^^^^^
119
120error[E0107]: this struct takes 2 type arguments but only 1 type argument was supplied
121 --> $DIR/wrong-number-of-args.rs:30:14
122 |
123LL | type B = Ty<usize>;
124 | ^^ ----- supplied 1 type argument
125 | |
126 | expected 2 type arguments
127 |
128note: struct defined here, with 2 type parameters: `A`, `B`
129 --> $DIR/wrong-number-of-args.rs:24:12
130 |
131LL | struct Ty<A, B>;
132 | ^^ - -
133help: add missing type argument
134 |
135LL | type B = Ty<usize, B>;
136 | ^^^
137
138error[E0107]: this struct takes 2 type arguments but 3 type arguments were supplied
139 --> $DIR/wrong-number-of-args.rs:36:14
140 |
141LL | type D = Ty<usize, String, char>;
142 | ^^ ------ help: remove this type argument
143 | |
144 | expected 2 type arguments
145 |
146note: struct defined here, with 2 type parameters: `A`, `B`
147 --> $DIR/wrong-number-of-args.rs:24:12
148 |
149LL | struct Ty<A, B>;
150 | ^^ - -
151
152error[E0107]: missing generics for struct `lifetime_and_type::Ty`
153 --> $DIR/wrong-number-of-args.rs:44:14
154 |
155LL | type A = Ty;
156 | ^^ expected 1 type argument
157 |
158note: struct defined here, with 1 type parameter: `T`
159 --> $DIR/wrong-number-of-args.rs:42:12
160 |
161LL | struct Ty<'a, T>;
162 | ^^ -
163help: use angle brackets to add missing type argument
164 |
165LL | type A = Ty<T>;
166 | ^^^
167
168error[E0107]: this struct takes 1 type argument but 0 type arguments were supplied
169 --> $DIR/wrong-number-of-args.rs:50:14
170 |
171LL | type B = Ty<'static>;
172 | ^^ expected 1 type argument
173 |
174note: struct defined here, with 1 type parameter: `T`
175 --> $DIR/wrong-number-of-args.rs:42:12
176 |
177LL | struct Ty<'a, T>;
178 | ^^ -
179help: add missing type argument
180 |
181LL | type B = Ty<'static, T>;
182 | ^^^
183
184error[E0107]: missing generics for struct `type_and_type_and_type::Ty`
185 --> $DIR/wrong-number-of-args.rs:64:14
186 |
187LL | type A = Ty;
188 | ^^ expected at least 2 type arguments
189 |
190note: struct defined here, with at least 2 type parameters: `A`, `B`
191 --> $DIR/wrong-number-of-args.rs:62:12
192 |
193LL | struct Ty<A, B, C = &'static str>;
194 | ^^ - -
195help: use angle brackets to add missing type arguments
196 |
197LL | type A = Ty<A, B>;
198 | ^^^^^^
199
200error[E0107]: this struct takes at least 2 type arguments but only 1 type argument was supplied
201 --> $DIR/wrong-number-of-args.rs:68:14
202 |
203LL | type B = Ty<usize>;
204 | ^^ ----- supplied 1 type argument
205 | |
206 | expected at least 2 type arguments
207 |
208note: struct defined here, with at least 2 type parameters: `A`, `B`
209 --> $DIR/wrong-number-of-args.rs:62:12
210 |
211LL | struct Ty<A, B, C = &'static str>;
212 | ^^ - -
213help: add missing type argument
214 |
215LL | type B = Ty<usize, B>;
216 | ^^^
217
218error[E0107]: this struct takes at most 3 type arguments but 4 type arguments were supplied
219 --> $DIR/wrong-number-of-args.rs:76:14
220 |
221LL | type E = Ty<usize, String, char, f64>;
222 | ^^ ----- help: remove this type argument
223 | |
224 | expected at most 3 type arguments
225 |
226note: struct defined here, with at most 3 type parameters: `A`, `B`, `C`
227 --> $DIR/wrong-number-of-args.rs:62:12
228 |
229LL | struct Ty<A, B, C = &'static str>;
230 | ^^ - - -
231
232error[E0107]: this trait takes 0 type arguments but 1 type argument was supplied
233 --> $DIR/wrong-number-of-args.rs:96:22
234 |
235LL | type A = Box<dyn NonGeneric<usize>>;
236 | ^^^^^^^^^^------- help: remove these generics
237 | |
238 | expected 0 type arguments
239 |
240note: trait defined here, with 0 type parameters
241 --> $DIR/wrong-number-of-args.rs:84:11
242 |
243LL | trait NonGeneric {
244 | ^^^^^^^^^^
245
246error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
247 --> $DIR/wrong-number-of-args.rs:104:22
248 |
249LL | type C = Box<dyn GenericLifetime<'static, 'static>>;
250 | ^^^^^^^^^^^^^^^ --------- help: remove this lifetime argument
251 | |
252 | expected 1 lifetime argument
253 |
254note: trait defined here, with 1 lifetime parameter: `'a`
255 --> $DIR/wrong-number-of-args.rs:88:11
256 |
257LL | trait GenericLifetime<'a> {
258 | ^^^^^^^^^^^^^^^ --
259
260error[E0107]: missing generics for trait `GenericType`
261 --> $DIR/wrong-number-of-args.rs:108:22
262 |
263LL | type D = Box<dyn GenericType>;
264 | ^^^^^^^^^^^ expected 1 type argument
265 |
266note: trait defined here, with 1 type parameter: `A`
267 --> $DIR/wrong-number-of-args.rs:92:11
268 |
269LL | trait GenericType<A> {
270 | ^^^^^^^^^^^ -
271help: use angle brackets to add missing type argument
272 |
273LL | type D = Box<dyn GenericType<A>>;
274 | ^^^
275
276error[E0107]: this trait takes 1 type argument but 2 type arguments were supplied
277 --> $DIR/wrong-number-of-args.rs:112:22
278 |
279LL | type E = Box<dyn GenericType<String, usize>>;
280 | ^^^^^^^^^^^ ------- help: remove this type argument
281 | |
282 | expected 1 type argument
283 |
284note: trait defined here, with 1 type parameter: `A`
285 --> $DIR/wrong-number-of-args.rs:92:11
286 |
287LL | trait GenericType<A> {
288 | ^^^^^^^^^^^ -
289
290error[E0107]: missing generics for struct `HashMap`
291 --> $DIR/wrong-number-of-args.rs:121:18
292 |
293LL | type A = HashMap;
294 | ^^^^^^^ expected at least 2 type arguments
295 |
296note: struct defined here, with at least 2 type parameters: `K`, `V`
297 --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
298 |
299LL | pub struct HashMap<K, V, S = RandomState> {
300 | ^^^^^^^ - -
301help: use angle brackets to add missing type arguments
302 |
303LL | type A = HashMap<K, V>;
304 | ^^^^^^
305
306error[E0107]: this struct takes at least 2 type arguments but only 1 type argument was supplied
307 --> $DIR/wrong-number-of-args.rs:125:18
308 |
309LL | type B = HashMap<String>;
310 | ^^^^^^^ ------ supplied 1 type argument
311 | |
312 | expected at least 2 type arguments
313 |
314note: struct defined here, with at least 2 type parameters: `K`, `V`
315 --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
316 |
317LL | pub struct HashMap<K, V, S = RandomState> {
318 | ^^^^^^^ - -
319help: add missing type argument
320 |
321LL | type B = HashMap<String, V>;
322 | ^^^
323
324error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
325 --> $DIR/wrong-number-of-args.rs:129:18
326 |
327LL | type C = HashMap<'static>;
328 | ^^^^^^^--------- help: remove these generics
329 | |
330 | expected 0 lifetime arguments
331 |
332note: struct defined here, with 0 lifetime parameters
333 --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
334 |
335LL | pub struct HashMap<K, V, S = RandomState> {
336 | ^^^^^^^
337
338error[E0107]: this struct takes at least 2 type arguments but 0 type arguments were supplied
339 --> $DIR/wrong-number-of-args.rs:129:18
340 |
341LL | type C = HashMap<'static>;
342 | ^^^^^^^ expected at least 2 type arguments
343 |
344note: struct defined here, with at least 2 type parameters: `K`, `V`
345 --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
346 |
347LL | pub struct HashMap<K, V, S = RandomState> {
348 | ^^^^^^^ - -
349help: add missing type arguments
350 |
351LL | type C = HashMap<'static, K, V>;
352 | ^^^^^^
353
354error[E0107]: this struct takes at most 3 type arguments but 4 type arguments were supplied
355 --> $DIR/wrong-number-of-args.rs:135:18
356 |
357LL | type D = HashMap<usize, String, char, f64>;
358 | ^^^^^^^ ----- help: remove this type argument
359 | |
360 | expected at most 3 type arguments
361 |
362note: struct defined here, with at most 3 type parameters: `K`, `V`, `S`
363 --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
364 |
365LL | pub struct HashMap<K, V, S = RandomState> {
366 | ^^^^^^^ - - -
367
6a06907d 368error[E0107]: missing generics for enum `Result`
5869c6ff
XL
369 --> $DIR/wrong-number-of-args.rs:141:18
370 |
371LL | type A = Result;
372 | ^^^^^^ expected 2 type arguments
373 |
374note: enum defined here, with 2 type parameters: `T`, `E`
375 --> $SRC_DIR/core/src/result.rs:LL:COL
376 |
377LL | pub enum Result<T, E> {
378 | ^^^^^^ - -
379help: use angle brackets to add missing type arguments
380 |
381LL | type A = Result<T, E>;
382 | ^^^^^^
383
384error[E0107]: this enum takes 2 type arguments but only 1 type argument was supplied
385 --> $DIR/wrong-number-of-args.rs:145:18
386 |
387LL | type B = Result<String>;
388 | ^^^^^^ ------ supplied 1 type argument
389 | |
390 | expected 2 type arguments
391 |
392note: enum defined here, with 2 type parameters: `T`, `E`
393 --> $SRC_DIR/core/src/result.rs:LL:COL
394 |
395LL | pub enum Result<T, E> {
396 | ^^^^^^ - -
397help: add missing type argument
398 |
399LL | type B = Result<String, E>;
400 | ^^^
401
402error[E0107]: this enum takes 0 lifetime arguments but 1 lifetime argument was supplied
403 --> $DIR/wrong-number-of-args.rs:149:18
404 |
405LL | type C = Result<'static>;
406 | ^^^^^^--------- help: remove these generics
407 | |
408 | expected 0 lifetime arguments
409 |
410note: enum defined here, with 0 lifetime parameters
411 --> $SRC_DIR/core/src/result.rs:LL:COL
412 |
413LL | pub enum Result<T, E> {
414 | ^^^^^^
415
416error[E0107]: this enum takes 2 type arguments but 0 type arguments were supplied
417 --> $DIR/wrong-number-of-args.rs:149:18
418 |
419LL | type C = Result<'static>;
420 | ^^^^^^ expected 2 type arguments
421 |
422note: enum defined here, with 2 type parameters: `T`, `E`
423 --> $SRC_DIR/core/src/result.rs:LL:COL
424 |
425LL | pub enum Result<T, E> {
426 | ^^^^^^ - -
427help: add missing type arguments
428 |
429LL | type C = Result<'static, T, E>;
430 | ^^^^^^
431
432error[E0107]: this enum takes 2 type arguments but 3 type arguments were supplied
433 --> $DIR/wrong-number-of-args.rs:155:18
434 |
435LL | type D = Result<usize, String, char>;
436 | ^^^^^^ ------ help: remove this type argument
437 | |
438 | expected 2 type arguments
439 |
440note: enum defined here, with 2 type parameters: `T`, `E`
441 --> $SRC_DIR/core/src/result.rs:LL:COL
442 |
443LL | pub enum Result<T, E> {
444 | ^^^^^^ - -
445
446error: aborting due to 30 previous errors
447
448Some errors have detailed explanations: E0106, E0107.
449For more information about an error, try `rustc --explain E0106`.