fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0038]: the trait `Trait` cannot be made into an object 2 --> $DIR/wf-convert-unsafe-trait-obj.rs:16:25 3 | 4LL | let t: &dyn Trait = &S; 5 | ^^ `Trait` 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/wf-convert-unsafe-trait-obj.rs:6:14 9 | 10LL | trait Trait: Sized {} 11 | ----- ^^^^^ ...because it requires `Self: Sized` 12 | | 13 | this trait cannot be made into an object... 14 = note: required for the cast from `&S` to `&dyn Trait` 15 16error[E0038]: the trait `Trait` cannot be made into an object 17 --> $DIR/wf-convert-unsafe-trait-obj.rs:17:17 18 | 19LL | takes_trait(&S); 20 | ^^ `Trait` 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/wf-convert-unsafe-trait-obj.rs:6:14 24 | 25LL | trait Trait: Sized {} 26 | ----- ^^^^^ ...because it requires `Self: Sized` 27 | | 28 | this trait cannot be made into an object... 29 = note: required for the cast from `&S` to `&dyn Trait` 30 31error[E0038]: the trait `Trait` cannot be made into an object 32 --> $DIR/wf-convert-unsafe-trait-obj.rs:15:5 33 | 34LL | &S as &dyn Trait; 35 | ^^ `Trait` cannot be made into an object 36 | 37note: 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> 38 --> $DIR/wf-convert-unsafe-trait-obj.rs:6:14 39 | 40LL | trait Trait: Sized {} 41 | ----- ^^^^^ ...because it requires `Self: Sized` 42 | | 43 | this trait cannot be made into an object... 44 = note: required for the cast from `&S` to `&dyn Trait` 45 46error: aborting due to 3 previous errors 47 48For more information about this error, try `rustc --explain E0038`.