| error[E0038]: the trait `Bar` cannot be made into an object |
| --> $DIR/issue-19538.rs:17:15 |
| | |
| LL | fn foo<T>(&self, val: T); |
| | --- ...because method `foo` has generic type parameters |
| ... |
| LL | trait Bar: Foo { } |
| | --- this trait cannot be made into an object... |
| ... |
| LL | let test: &mut dyn Bar = &mut thing; |
| | ^^^^^^^^^^^^ the trait `Bar` cannot be made into an object |
| | |
| = help: consider moving `foo` to another trait |
| |
| error[E0038]: the trait `Bar` cannot be made into an object |
| --> $DIR/issue-19538.rs:17:30 |
| | |
| LL | fn foo<T>(&self, val: T); |
| | --- ...because method `foo` has generic type parameters |
| ... |
| LL | trait Bar: Foo { } |
| | --- this trait cannot be made into an object... |
| ... |
| LL | let test: &mut dyn Bar = &mut thing; |
| | ^^^^^^^^^^ the trait `Bar` cannot be made into an object |
| | |
| = help: consider moving `foo` to another trait |
| = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&mut dyn Bar>` for `&mut Thing` |
| = note: required by cast to type `&mut dyn Bar` |
| |
| error: aborting due to 2 previous errors |
| |
| For more information about this error, try `rustc --explain E0038`. |