fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

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