]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0038]: the trait `Bar` cannot be made into an object |
0731742a | 2 | --> $DIR/issue-19538.rs:17:15 |
8faf50e0 | 3 | | |
e1599b0c | 4 | LL | fn foo<T>(&self, val: T); |
74b04a01 XL |
5 | | --- ...because method `foo` has generic type parameters |
6 | ... | |
7 | LL | trait Bar: Foo { } | |
8 | | --- this trait cannot be made into an object... | |
e1599b0c | 9 | ... |
dc9dc135 XL |
10 | LL | let test: &mut dyn Bar = &mut thing; |
11 | | ^^^^^^^^^^^^ the trait `Bar` cannot be made into an object | |
74b04a01 XL |
12 | | |
13 | = help: consider moving `foo` to another trait | |
8faf50e0 XL |
14 | |
15 | error[E0038]: the trait `Bar` cannot be made into an object | |
dc9dc135 | 16 | --> $DIR/issue-19538.rs:17:30 |
8faf50e0 | 17 | | |
e1599b0c | 18 | LL | fn foo<T>(&self, val: T); |
74b04a01 XL |
19 | | --- ...because method `foo` has generic type parameters |
20 | ... | |
21 | LL | trait Bar: Foo { } | |
22 | | --- this trait cannot be made into an object... | |
e1599b0c | 23 | ... |
dc9dc135 XL |
24 | LL | let test: &mut dyn Bar = &mut thing; |
25 | | ^^^^^^^^^^ the trait `Bar` cannot be made into an object | |
8faf50e0 | 26 | | |
74b04a01 | 27 | = help: consider moving `foo` to another trait |
1b1a35ee | 28 | = note: required because of the requirements on the impl of `CoerceUnsized<&mut dyn Bar>` for `&mut Thing` |
e74abb32 | 29 | = note: required by cast to type `&mut dyn Bar` |
8faf50e0 XL |
30 | |
31 | error: aborting due to 2 previous errors | |
32 | ||
33 | For more information about this error, try `rustc --explain E0038`. |