1 error[E0038]: the trait `Bar` cannot be made into an object
2 --> $DIR/issue-19538.rs:17:15
4 LL | let test: &mut dyn Bar = &mut thing;
5 | ^^^^^^^^^^^^ `Bar` cannot be made into an object
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-19538.rs:2:8
10 LL | fn foo<T>(&self, val: T);
11 | ^^^ ...because method `foo` has generic type parameters
13 LL | trait Bar: Foo { }
14 | --- this trait cannot be made into an object...
15 = help: consider moving `foo` to another trait
17 error[E0038]: the trait `Bar` cannot be made into an object
18 --> $DIR/issue-19538.rs:17:30
20 LL | let test: &mut dyn Bar = &mut thing;
21 | ^^^^^^^^^^ `Bar` cannot be made into an object
23 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>
24 --> $DIR/issue-19538.rs:2:8
26 LL | fn foo<T>(&self, val: T);
27 | ^^^ ...because method `foo` has generic type parameters
29 LL | trait Bar: Foo { }
30 | --- this trait cannot be made into an object...
31 = help: consider moving `foo` to another trait
32 = note: required because of the requirements on the impl of `CoerceUnsized<&mut dyn Bar>` for `&mut Thing`
33 = note: required by cast to type `&mut dyn Bar`
35 error: aborting due to 2 previous errors
37 For more information about this error, try `rustc --explain E0038`.