]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/trait-alias/trait-alias-no-extra-traits.stderr
pin docs: add some forward references
[rust.git] / src / test / ui / traits / trait-alias / trait-alias-no-extra-traits.stderr
1 error[E0225]: only auto traits can be used as additional traits in a trait object
2   --> $DIR/trait-alias-no-extra-traits.rs:16:22
3    |
4 LL | trait _0 = ObjA;
5    |            ---- first non-auto trait
6 ...
7 LL | type _T00 = dyn _0 + ObjB;
8    |                 --   ^^^^
9    |                 |    |
10    |                 |    additional non-auto trait
11    |                 |    trait alias used in trait object type (additional use)
12    |                 trait alias used in trait object type (first use)
13
14 error[E0225]: only auto traits can be used as additional traits in a trait object
15   --> $DIR/trait-alias-no-extra-traits.rs:19:24
16    |
17 LL | trait _0 = ObjA;
18    |            ---- additional non-auto trait
19 ...
20 LL | type _T01 = dyn ObjB + _0;
21    |                 ----   ^^ trait alias used in trait object type (additional use)
22    |                 |
23    |                 first non-auto trait
24    |                 trait alias used in trait object type (first use)
25
26 error[E0225]: only auto traits can be used as additional traits in a trait object
27   --> $DIR/trait-alias-no-extra-traits.rs:22:24
28    |
29 LL | trait _0 = ObjA;
30    |            ---- additional non-auto trait
31 LL | trait _1 = _0;
32    |            -- referenced here (additional use)
33 ...
34 LL | type _T02 = dyn ObjB + _1;
35    |                 ----   ^^ trait alias used in trait object type (additional use)
36    |                 |
37    |                 first non-auto trait
38    |                 trait alias used in trait object type (first use)
39
40 error[E0225]: only auto traits can be used as additional traits in a trait object
41   --> $DIR/trait-alias-no-extra-traits.rs:25:22
42    |
43 LL | trait _0 = ObjA;
44    |            ---- first non-auto trait
45 LL | trait _1 = _0;
46    |            -- referenced here (first use)
47 ...
48 LL | type _T03 = dyn _1 + ObjB;
49    |                 --   ^^^^
50    |                 |    |
51    |                 |    additional non-auto trait
52    |                 |    trait alias used in trait object type (additional use)
53    |                 trait alias used in trait object type (first use)
54
55 error[E0225]: only auto traits can be used as additional traits in a trait object
56   --> $DIR/trait-alias-no-extra-traits.rs:34:22
57    |
58 LL | trait _2 = ObjB;
59    |            ----
60    |            |
61    |            additional non-auto trait
62    |            first non-auto trait
63 LL | trait _3 = _2;
64    |            -- referenced here (additional use)
65 ...
66 LL | type _T10 = dyn _2 + _3;
67    |                 --   ^^ trait alias used in trait object type (additional use)
68    |                 |
69    |                 trait alias used in trait object type (first use)
70
71 error[E0225]: only auto traits can be used as additional traits in a trait object
72   --> $DIR/trait-alias-no-extra-traits.rs:37:22
73    |
74 LL | trait _2 = ObjB;
75    |            ----
76    |            |
77    |            additional non-auto trait
78    |            first non-auto trait
79 LL | trait _3 = _2;
80    |            -- referenced here (first use)
81 ...
82 LL | type _T11 = dyn _3 + _2;
83    |                 --   ^^ trait alias used in trait object type (additional use)
84    |                 |
85    |                 trait alias used in trait object type (first use)
86
87 error[E0225]: only auto traits can be used as additional traits in a trait object
88   --> $DIR/trait-alias-no-extra-traits.rs:40:22
89    |
90 LL | trait _2 = ObjB;
91    |            ----
92    |            |
93    |            additional non-auto trait
94    |            first non-auto trait
95 LL | trait _3 = _2;
96    |            -- referenced here (additional use)
97 LL | trait _4 = _3;
98    |            -- referenced here (additional use)
99 ...
100 LL | type _T12 = dyn _2 + _4;
101    |                 --   ^^ trait alias used in trait object type (additional use)
102    |                 |
103    |                 trait alias used in trait object type (first use)
104
105 error[E0225]: only auto traits can be used as additional traits in a trait object
106   --> $DIR/trait-alias-no-extra-traits.rs:43:22
107    |
108 LL | trait _2 = ObjB;
109    |            ----
110    |            |
111    |            additional non-auto trait
112    |            first non-auto trait
113 LL | trait _3 = _2;
114    |            -- referenced here (first use)
115 LL | trait _4 = _3;
116    |            -- referenced here (first use)
117 ...
118 LL | type _T13 = dyn _4 + _2;
119    |                 --   ^^ trait alias used in trait object type (additional use)
120    |                 |
121    |                 trait alias used in trait object type (first use)
122
123 error[E0225]: only auto traits can be used as additional traits in a trait object
124   --> $DIR/trait-alias-no-extra-traits.rs:50:22
125    |
126 LL | trait _0 = ObjA;
127    |            ---- additional non-auto trait
128 LL | trait _1 = _0;
129    |            -- referenced here (additional use)
130 ...
131 LL | trait _5 = Sync + ObjB + Send;
132    |                   ---- first non-auto trait
133 LL | 
134 LL | type _T20 = dyn _5 + _1;
135    |                 --   ^^ trait alias used in trait object type (additional use)
136    |                 |
137    |                 trait alias used in trait object type (first use)
138
139 error[E0225]: only auto traits can be used as additional traits in a trait object
140   --> $DIR/trait-alias-no-extra-traits.rs:53:22
141    |
142 LL | trait _0 = ObjA;
143    |            ---- first non-auto trait
144 LL | trait _1 = _0;
145    |            -- referenced here (first use)
146 ...
147 LL | trait _5 = Sync + ObjB + Send;
148    |                   ---- additional non-auto trait
149 ...
150 LL | type _T21 = dyn _1 + _5;
151    |                 --   ^^ trait alias used in trait object type (additional use)
152    |                 |
153    |                 trait alias used in trait object type (first use)
154
155 error[E0225]: only auto traits can be used as additional traits in a trait object
156   --> $DIR/trait-alias-no-extra-traits.rs:56:22
157    |
158 LL | trait _5 = Sync + ObjB + Send;
159    |                   ---- first non-auto trait
160 ...
161 LL | type _T22 = dyn _5 + ObjA;
162    |                 --   ^^^^
163    |                 |    |
164    |                 |    additional non-auto trait
165    |                 |    trait alias used in trait object type (additional use)
166    |                 trait alias used in trait object type (first use)
167
168 error[E0225]: only auto traits can be used as additional traits in a trait object
169   --> $DIR/trait-alias-no-extra-traits.rs:59:24
170    |
171 LL | trait _5 = Sync + ObjB + Send;
172    |                   ---- additional non-auto trait
173 ...
174 LL | type _T23 = dyn ObjA + _5;
175    |                 ----   ^^ trait alias used in trait object type (additional use)
176    |                 |
177    |                 first non-auto trait
178    |                 trait alias used in trait object type (first use)
179
180 error[E0225]: only auto traits can be used as additional traits in a trait object
181   --> $DIR/trait-alias-no-extra-traits.rs:62:29
182    |
183 LL | trait _0 = ObjA;
184    |            ---- additional non-auto trait
185 LL | trait _1 = _0;
186    |            -- referenced here (additional use)
187 ...
188 LL | trait _5 = Sync + ObjB + Send;
189    |                   ---- first non-auto trait
190 ...
191 LL | type _T24 = dyn Send + _5 + _1 + Sync;
192    |                        --   ^^ trait alias used in trait object type (additional use)
193    |                        |
194    |                        trait alias used in trait object type (first use)
195
196 error[E0225]: only auto traits can be used as additional traits in a trait object
197   --> $DIR/trait-alias-no-extra-traits.rs:65:29
198    |
199 LL | trait _0 = ObjA;
200    |            ---- first non-auto trait
201 LL | trait _1 = _0;
202    |            -- referenced here (first use)
203 ...
204 LL | trait _5 = Sync + ObjB + Send;
205    |                   ---- additional non-auto trait
206 ...
207 LL | type _T25 = dyn _1 + Sync + _5 + Send;
208    |                 --          ^^ trait alias used in trait object type (additional use)
209    |                 |
210    |                 trait alias used in trait object type (first use)
211
212 error[E0225]: only auto traits can be used as additional traits in a trait object
213   --> $DIR/trait-alias-no-extra-traits.rs:68:36
214    |
215 LL | trait _5 = Sync + ObjB + Send;
216    |                   ---- first non-auto trait
217 ...
218 LL | type _T26 = dyn Sync + Send + _5 + ObjA;
219    |                               --   ^^^^
220    |                               |    |
221    |                               |    additional non-auto trait
222    |                               |    trait alias used in trait object type (additional use)
223    |                               trait alias used in trait object type (first use)
224
225 error[E0225]: only auto traits can be used as additional traits in a trait object
226   --> $DIR/trait-alias-no-extra-traits.rs:71:38
227    |
228 LL | trait _5 = Sync + ObjB + Send;
229    |                   ---- additional non-auto trait
230 ...
231 LL | type _T27 = dyn Send + Sync + ObjA + _5;
232    |                               ----   ^^ trait alias used in trait object type (additional use)
233    |                               |
234    |                               first non-auto trait
235    |                               trait alias used in trait object type (first use)
236
237 error[E0225]: only auto traits can be used as additional traits in a trait object
238   --> $DIR/trait-alias-no-extra-traits.rs:80:17
239    |
240 LL | trait _0 = ObjA;
241    |            ---- first non-auto trait
242 LL | trait _1 = _0;
243    |            -- referenced here (first use)
244 ...
245 LL | trait _5 = Sync + ObjB + Send;
246    |                   ---- additional non-auto trait
247 ...
248 LL | trait _6 = _1 + _5;
249    |            --   -- referenced here (additional use)
250    |            |
251    |            referenced here (first use)
252 ...
253 LL | type _T30 = dyn _6;
254    |                 ^^
255    |                 |
256    |                 trait alias used in trait object type (additional use)
257    |                 trait alias used in trait object type (first use)
258
259 error[E0225]: only auto traits can be used as additional traits in a trait object
260   --> $DIR/trait-alias-no-extra-traits.rs:83:17
261    |
262 LL | trait _0 = ObjA;
263    |            ---- first non-auto trait
264 LL | trait _1 = _0;
265    |            -- referenced here (first use)
266 ...
267 LL | trait _5 = Sync + ObjB + Send;
268    |                   ---- additional non-auto trait
269 ...
270 LL | trait _6 = _1 + _5;
271    |            --   -- referenced here (additional use)
272    |            |
273    |            referenced here (first use)
274 ...
275 LL | type _T31 = dyn _6 + Send;
276    |                 ^^
277    |                 |
278    |                 trait alias used in trait object type (additional use)
279    |                 trait alias used in trait object type (first use)
280
281 error[E0225]: only auto traits can be used as additional traits in a trait object
282   --> $DIR/trait-alias-no-extra-traits.rs:86:24
283    |
284 LL | trait _0 = ObjA;
285    |            ---- first non-auto trait
286 LL | trait _1 = _0;
287    |            -- referenced here (first use)
288 ...
289 LL | trait _5 = Sync + ObjB + Send;
290    |                   ---- additional non-auto trait
291 ...
292 LL | trait _6 = _1 + _5;
293    |            --   -- referenced here (additional use)
294    |            |
295    |            referenced here (first use)
296 ...
297 LL | type _T32 = dyn Send + _6;
298    |                        ^^
299    |                        |
300    |                        trait alias used in trait object type (additional use)
301    |                        trait alias used in trait object type (first use)
302
303 error[E0225]: only auto traits can be used as additional traits in a trait object
304   --> $DIR/trait-alias-no-extra-traits.rs:89:17
305    |
306 LL | trait _0 = ObjA;
307    |            ---- first non-auto trait
308 LL | trait _1 = _0;
309    |            -- referenced here (first use)
310 ...
311 LL | trait _5 = Sync + ObjB + Send;
312    |                   ---- additional non-auto trait
313 ...
314 LL | trait _6 = _1 + _5;
315    |            --   -- referenced here (additional use)
316    |            |
317    |            referenced here (first use)
318 LL | trait _7 = _6;
319    |            --
320    |            |
321    |            referenced here (additional use)
322    |            referenced here (first use)
323 LL | trait _8 = _7;
324    |            --
325    |            |
326    |            referenced here (additional use)
327    |            referenced here (first use)
328 ...
329 LL | type _T33 = dyn _8;
330    |                 ^^
331    |                 |
332    |                 trait alias used in trait object type (additional use)
333    |                 trait alias used in trait object type (first use)
334
335 error[E0225]: only auto traits can be used as additional traits in a trait object
336   --> $DIR/trait-alias-no-extra-traits.rs:92:17
337    |
338 LL | trait _0 = ObjA;
339    |            ---- first non-auto trait
340 LL | trait _1 = _0;
341    |            -- referenced here (first use)
342 ...
343 LL | trait _5 = Sync + ObjB + Send;
344    |                   ---- additional non-auto trait
345 ...
346 LL | trait _6 = _1 + _5;
347    |            --   -- referenced here (additional use)
348    |            |
349    |            referenced here (first use)
350 LL | trait _7 = _6;
351    |            --
352    |            |
353    |            referenced here (additional use)
354    |            referenced here (first use)
355 LL | trait _8 = _7;
356    |            --
357    |            |
358    |            referenced here (additional use)
359    |            referenced here (first use)
360 ...
361 LL | type _T34 = dyn _8 + Send;
362    |                 ^^
363    |                 |
364    |                 trait alias used in trait object type (additional use)
365    |                 trait alias used in trait object type (first use)
366
367 error[E0225]: only auto traits can be used as additional traits in a trait object
368   --> $DIR/trait-alias-no-extra-traits.rs:95:24
369    |
370 LL | trait _0 = ObjA;
371    |            ---- first non-auto trait
372 LL | trait _1 = _0;
373    |            -- referenced here (first use)
374 ...
375 LL | trait _5 = Sync + ObjB + Send;
376    |                   ---- additional non-auto trait
377 ...
378 LL | trait _6 = _1 + _5;
379    |            --   -- referenced here (additional use)
380    |            |
381    |            referenced here (first use)
382 LL | trait _7 = _6;
383    |            --
384    |            |
385    |            referenced here (additional use)
386    |            referenced here (first use)
387 LL | trait _8 = _7;
388    |            --
389    |            |
390    |            referenced here (additional use)
391    |            referenced here (first use)
392 ...
393 LL | type _T35 = dyn Send + _8;
394    |                        ^^
395    |                        |
396    |                        trait alias used in trait object type (additional use)
397    |                        trait alias used in trait object type (first use)
398
399 error[E0225]: only auto traits can be used as additional traits in a trait object
400   --> $DIR/trait-alias-no-extra-traits.rs:103:23
401    |
402 LL | trait _5 = Sync + ObjB + Send;
403    |                   ---- first non-auto trait
404 ...
405 LL | trait _9 = _5 + Sync;
406    |            -- referenced here (first use)
407 LL | trait _10 = Unpin + _9;
408    |                     -- referenced here (first use)
409 LL | 
410 LL | type _T40 = dyn _10 + ObjA;
411    |                 ---   ^^^^
412    |                 |     |
413    |                 |     additional non-auto trait
414    |                 |     trait alias used in trait object type (additional use)
415    |                 trait alias used in trait object type (first use)
416
417 error[E0225]: only auto traits can be used as additional traits in a trait object
418   --> $DIR/trait-alias-no-extra-traits.rs:106:24
419    |
420 LL | trait _5 = Sync + ObjB + Send;
421    |                   ---- additional non-auto trait
422 ...
423 LL | trait _9 = _5 + Sync;
424    |            -- referenced here (additional use)
425 LL | trait _10 = Unpin + _9;
426    |                     -- referenced here (additional use)
427 ...
428 LL | type _T41 = dyn ObjA + _10;
429    |                 ----   ^^^ trait alias used in trait object type (additional use)
430    |                 |
431    |                 first non-auto trait
432    |                 trait alias used in trait object type (first use)
433
434 error[E0225]: only auto traits can be used as additional traits in a trait object
435   --> $DIR/trait-alias-no-extra-traits.rs:109:23
436    |
437 LL | trait _0 = ObjA;
438    |            ---- additional non-auto trait
439 LL | trait _1 = _0;
440    |            -- referenced here (additional use)
441 ...
442 LL | trait _5 = Sync + ObjB + Send;
443    |                   ---- first non-auto trait
444 ...
445 LL | trait _9 = _5 + Sync;
446    |            -- referenced here (first use)
447 LL | trait _10 = Unpin + _9;
448    |                     -- referenced here (first use)
449 ...
450 LL | type _T42 = dyn _10 + _1;
451    |                 ---   ^^ trait alias used in trait object type (additional use)
452    |                 |
453    |                 trait alias used in trait object type (first use)
454
455 error[E0225]: only auto traits can be used as additional traits in a trait object
456   --> $DIR/trait-alias-no-extra-traits.rs:112:37
457    |
458 LL | trait _5 = Sync + ObjB + Send;
459    |                   ---- first non-auto trait
460 ...
461 LL | trait _9 = _5 + Sync;
462    |            -- referenced here (first use)
463 LL | trait _10 = Unpin + _9;
464    |                     -- referenced here (first use)
465 ...
466 LL | type _T43 = dyn Send + _10 + Sync + ObjA;
467    |                        ---          ^^^^
468    |                        |            |
469    |                        |            additional non-auto trait
470    |                        |            trait alias used in trait object type (additional use)
471    |                        trait alias used in trait object type (first use)
472
473 error[E0225]: only auto traits can be used as additional traits in a trait object
474   --> $DIR/trait-alias-no-extra-traits.rs:115:24
475    |
476 LL | trait _5 = Sync + ObjB + Send;
477    |                   ---- additional non-auto trait
478 ...
479 LL | trait _9 = _5 + Sync;
480    |            -- referenced here (additional use)
481 LL | trait _10 = Unpin + _9;
482    |                     -- referenced here (additional use)
483 ...
484 LL | type _T44 = dyn ObjA + _10 + Send + Sync;
485    |                 ----   ^^^ trait alias used in trait object type (additional use)
486    |                 |
487    |                 first non-auto trait
488    |                 trait alias used in trait object type (first use)
489
490 error[E0225]: only auto traits can be used as additional traits in a trait object
491   --> $DIR/trait-alias-no-extra-traits.rs:118:37
492    |
493 LL | trait _0 = ObjA;
494    |            ---- additional non-auto trait
495 LL | trait _1 = _0;
496    |            -- referenced here (additional use)
497 ...
498 LL | trait _5 = Sync + ObjB + Send;
499    |                   ---- first non-auto trait
500 ...
501 LL | trait _9 = _5 + Sync;
502    |            -- referenced here (first use)
503 LL | trait _10 = Unpin + _9;
504    |                     -- referenced here (first use)
505 ...
506 LL | type _T45 = dyn Sync + Send + _10 + _1;
507    |                               ---   ^^ trait alias used in trait object type (additional use)
508    |                               |
509    |                               trait alias used in trait object type (first use)
510
511 error: aborting due to 28 previous errors
512
513 For more information about this error, try `rustc --explain E0225`.