1 error[E0038]: the trait `Bar` cannot be made into an object
2 --> $DIR/issue-19538.rs:17:15
4 LL | fn foo<T>(&self, val: T);
5 | --- method `foo` has generic type parameters
7 LL | let test: &mut dyn Bar = &mut thing;
8 | ^^^^^^^^^^^^ the trait `Bar` cannot be made into an object
10 error[E0038]: the trait `Bar` cannot be made into an object
11 --> $DIR/issue-19538.rs:17:30
13 LL | fn foo<T>(&self, val: T);
14 | --- method `foo` has generic type parameters
16 LL | let test: &mut dyn Bar = &mut thing;
17 | ^^^^^^^^^^ the trait `Bar` cannot be made into an object
19 = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&mut dyn Bar>` for `&mut Thing`
20 = note: required by cast to type `&mut dyn Bar`
22 error: aborting due to 2 previous errors
24 For more information about this error, try `rustc --explain E0038`.