]>
Commit | Line | Data |
---|---|---|
e74abb32 XL |
1 | error[E0038]: the trait `Bar` cannot be made into an object |
2 | --> $DIR/object-safety-mentions-Self.rs:24:5 | |
3 | | | |
74b04a01 XL |
4 | LL | trait Bar { |
5 | | --- this trait cannot be made into an object... | |
e74abb32 | 6 | LL | fn bar(&self, x: &Self); |
74b04a01 | 7 | | ----- ...because method `bar` references the `Self` type in this parameter |
e74abb32 XL |
8 | ... |
9 | LL | t | |
10 | | ^ the trait `Bar` cannot be made into an object | |
11 | | | |
74b04a01 | 12 | = help: consider moving `bar` to another trait |
1b1a35ee | 13 | = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Bar>` for `&T` |
e74abb32 XL |
14 | = note: required by cast to type `&dyn Bar` |
15 | ||
16 | error[E0038]: the trait `Baz` cannot be made into an object | |
17 | --> $DIR/object-safety-mentions-Self.rs:30:5 | |
18 | | | |
74b04a01 XL |
19 | LL | trait Baz { |
20 | | --- this trait cannot be made into an object... | |
e74abb32 | 21 | LL | fn baz(&self) -> Self; |
74b04a01 | 22 | | ---- ...because method `baz` references the `Self` type in its return type |
e74abb32 XL |
23 | ... |
24 | LL | t | |
25 | | ^ the trait `Baz` cannot be made into an object | |
26 | | | |
74b04a01 | 27 | = help: consider moving `baz` to another trait |
1b1a35ee | 28 | = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Baz>` for `&T` |
e74abb32 XL |
29 | = note: required by cast to type `&dyn Baz` |
30 | ||
31 | error: aborting due to 2 previous errors | |
32 | ||
33 | For more information about this error, try `rustc --explain E0038`. |