fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0038]: the trait `Bar` cannot be made into an object 2 --> $DIR/issue-19538.rs:17:15 3 | 4LL | let test: &mut dyn Bar = &mut thing; 5 | ^^^^^^^^^^^^ `Bar` 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-19538.rs:2:8 9 | 10LL | fn foo<T>(&self, val: T); 11 | ^^^ ...because method `foo` has generic type parameters 12... 13LL | trait Bar: Foo { } 14 | --- this trait cannot be made into an object... 15 = help: consider moving `foo` to another trait 16 17error[E0038]: the trait `Bar` cannot be made into an object 18 --> $DIR/issue-19538.rs:17:30 19 | 20LL | let test: &mut dyn Bar = &mut thing; 21 | ^^^^^^^^^^ `Bar` cannot be made into an object 22 | 23note: 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> 24 --> $DIR/issue-19538.rs:2:8 25 | 26LL | fn foo<T>(&self, val: T); 27 | ^^^ ...because method `foo` has generic type parameters 28... 29LL | trait Bar: Foo { } 30 | --- this trait cannot be made into an object... 31 = help: consider moving `foo` to another trait 32 = note: required for the cast from `&mut Thing` to `&mut dyn Bar` 33 34error: aborting due to 2 previous errors 35 36For more information about this error, try `rustc --explain E0038`.