]>
Commit | Line | Data |
---|---|---|
ff7c6d11 | 1 | error[E0038]: the trait `Array` cannot be made into an object |
0731742a | 2 | --> $DIR/issue-20692.rs:7:5 |
ff7c6d11 | 3 | | |
dc9dc135 | 4 | LL | &dyn Array; |
72b1a166 | 5 | | ^^^^^^^^^^ `Array` cannot be made into an object |
ff7c6d11 | 6 | | |
72b1a166 FG |
7 | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> |
8 | --> $DIR/issue-20692.rs:1:14 | |
9 | | | |
10 | LL | trait Array: Sized + Copy {} | |
11 | | ----- ^^^^^ ^^^^ ...because it requires `Self: Sized` | |
12 | | | | | |
13 | | | ...because it requires `Self: Sized` | |
14 | | this trait cannot be made into an object... | |
ff7c6d11 XL |
15 | |
16 | error[E0038]: the trait `Array` cannot be made into an object | |
0731742a | 17 | --> $DIR/issue-20692.rs:4:13 |
ff7c6d11 | 18 | | |
0531ce1d | 19 | LL | let _ = x |
72b1a166 FG |
20 | | ^ `Array` cannot be made into an object |
21 | | | |
22 | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> | |
23 | --> $DIR/issue-20692.rs:1:14 | |
ff7c6d11 | 24 | | |
72b1a166 FG |
25 | LL | trait Array: Sized + Copy {} |
26 | | ----- ^^^^^ ^^^^ ...because it requires `Self: Sized` | |
27 | | | | | |
28 | | | ...because it requires `Self: Sized` | |
29 | | this trait cannot be made into an object... | |
30 | = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Array>` for `&T` | |
e74abb32 | 31 | = note: required by cast to type `&dyn Array` |
ff7c6d11 XL |
32 | |
33 | error: aborting due to 2 previous errors | |
34 | ||
0531ce1d | 35 | For more information about this error, try `rustc --explain E0038`. |