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