]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/wf-trait-object-no-duplicates.stderr
pin docs: add some forward references
[rust.git] / src / test / ui / traits / wf-trait-object-no-duplicates.stderr
1 error[E0225]: only auto traits can be used as additional traits in a trait object
2   --> $DIR/wf-trait-object-no-duplicates.rs:8:21
3    |
4 LL | type _0 = dyn Obj + Obj;
5    |               ---   ^^^
6    |               |     |
7    |               |     additional non-auto trait
8    |               |     trait alias used in trait object type (additional use)
9    |               first non-auto trait
10    |               trait alias used in trait object type (first use)
11
12 error[E0225]: only auto traits can be used as additional traits in a trait object
13   --> $DIR/wf-trait-object-no-duplicates.rs:13:28
14    |
15 LL | type _1 = dyn Send + Obj + Obj;
16    |                      ---   ^^^
17    |                      |     |
18    |                      |     additional non-auto trait
19    |                      |     trait alias used in trait object type (additional use)
20    |                      first non-auto trait
21    |                      trait alias used in trait object type (first use)
22
23 error[E0225]: only auto traits can be used as additional traits in a trait object
24   --> $DIR/wf-trait-object-no-duplicates.rs:16:28
25    |
26 LL | type _2 = dyn Obj + Send + Obj;
27    |               ---          ^^^
28    |               |            |
29    |               |            additional non-auto trait
30    |               |            trait alias used in trait object type (additional use)
31    |               first non-auto trait
32    |               trait alias used in trait object type (first use)
33
34 error[E0225]: only auto traits can be used as additional traits in a trait object
35   --> $DIR/wf-trait-object-no-duplicates.rs:26:34
36    |
37 LL | type _4 = dyn for<'a> ObjL<'a> + for<'b> ObjL<'b>;
38    |               ----------------   ^^^^^^^^^^^^^^^^
39    |               |                  |
40    |               |                  additional non-auto trait
41    |               |                  trait alias used in trait object type (additional use)
42    |               first non-auto trait
43    |               trait alias used in trait object type (first use)
44
45 error[E0225]: only auto traits can be used as additional traits in a trait object
46   --> $DIR/wf-trait-object-no-duplicates.rs:30:42
47    |
48 LL | type _5 = dyn ObjT<for<'a> fn(&'a u8)> + ObjT<for<'b> fn(&'b u8)>;
49    |               ------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^
50    |               |                          |
51    |               |                          additional non-auto trait
52    |               |                          trait alias used in trait object type (additional use)
53    |               first non-auto trait
54    |               trait alias used in trait object type (first use)
55
56 error: aborting due to 5 previous errors
57
58 For more information about this error, try `rustc --explain E0225`.