]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/wf-object/no-duplicates.stderr
Rollup merge of #82179 - mbartlett21:patch-5, r=joshtriplett
[rust.git] / src / test / ui / traits / wf-object / no-duplicates.stderr
1 error[E0225]: only auto traits can be used as additional traits in a trait object
2   --> $DIR/no-duplicates.rs:8:21
3    |
4 LL | type _0 = dyn Obj + Obj;
5    |               ---   ^^^ additional non-auto trait
6    |               |
7    |               first non-auto trait
8    |
9    = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
10    = 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>
11
12 error[E0225]: only auto traits can be used as additional traits in a trait object
13   --> $DIR/no-duplicates.rs:13:28
14    |
15 LL | type _1 = dyn Send + Obj + Obj;
16    |                      ---   ^^^ additional non-auto trait
17    |                      |
18    |                      first non-auto trait
19    |
20    = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
21    = 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>
22
23 error[E0225]: only auto traits can be used as additional traits in a trait object
24   --> $DIR/no-duplicates.rs:16:28
25    |
26 LL | type _2 = dyn Obj + Send + Obj;
27    |               ---          ^^^ additional non-auto trait
28    |               |
29    |               first non-auto trait
30    |
31    = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Obj + Obj {}`
32    = 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>
33
34 error[E0225]: only auto traits can be used as additional traits in a trait object
35   --> $DIR/no-duplicates.rs:26:34
36    |
37 LL | type _4 = dyn for<'a> ObjL<'a> + for<'b> ObjL<'b>;
38    |               ----------------   ^^^^^^^^^^^^^^^^ additional non-auto trait
39    |               |
40    |               first non-auto trait
41    |
42    = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: for<'a> ObjL<'a> + for<'b> ObjL<'b> {}`
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>
44
45 error[E0225]: only auto traits can be used as additional traits in a trait object
46   --> $DIR/no-duplicates.rs:30:42
47    |
48 LL | type _5 = dyn ObjT<for<'a> fn(&'a u8)> + ObjT<for<'b> fn(&'b u8)>;
49    |               ------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^ additional non-auto trait
50    |               |
51    |               first non-auto trait
52    |
53    = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: ObjT<for<'a> fn(&'a u8)> + ObjT<for<'b> fn(&'b u8)> {}`
54    = 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>
55
56 error: aborting due to 5 previous errors
57
58 For more information about this error, try `rustc --explain E0225`.