fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0038]: the trait `Array` cannot be made into an object 2 --> $DIR/issue-20692.rs:7:5 3 | 4LL | &dyn Array; 5 | ^^^^^^^^^^ `Array` cannot be made into an object 6 | 7note: 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 | 10LL | 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... 15 16error[E0038]: the trait `Array` cannot be made into an object 17 --> $DIR/issue-20692.rs:4:13 18 | 19LL | let _ = x 20 | ^ `Array` cannot be made into an object 21 | 22note: 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 24 | 25LL | 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 for the cast from `&T` to `&dyn Array` 31 32error: aborting due to 2 previous errors 33 34For more information about this error, try `rustc --explain E0038`.