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