]>
Commit | Line | Data |
---|---|---|
ff7c6d11 | 1 | error[E0038]: the trait `Foo` cannot be made into an object |
60c5eb7d | 2 | --> $DIR/arbitrary-self-types-not-object-safe.rs:29:32 |
ff7c6d11 | 3 | | |
e1599b0c XL |
4 | LL | fn foo(self: &Rc<Self>) -> usize; |
5 | | --- method `foo`'s `self` parameter cannot be dispatched on | |
6 | ... | |
dc9dc135 XL |
7 | LL | let x = Rc::new(5usize) as Rc<dyn Foo>; |
8 | | ^^^^^^^^^^^ the trait `Foo` cannot be made into an object | |
ff7c6d11 XL |
9 | |
10 | error[E0038]: the trait `Foo` cannot be made into an object | |
60c5eb7d | 11 | --> $DIR/arbitrary-self-types-not-object-safe.rs:29:13 |
ff7c6d11 | 12 | | |
e1599b0c XL |
13 | LL | fn foo(self: &Rc<Self>) -> usize; |
14 | | --- method `foo`'s `self` parameter cannot be dispatched on | |
15 | ... | |
dc9dc135 | 16 | LL | let x = Rc::new(5usize) as Rc<dyn Foo>; |
a1dfa0c6 | 17 | | ^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object |
ff7c6d11 | 18 | | |
a1dfa0c6 | 19 | = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<std::rc::Rc<dyn Foo>>` for `std::rc::Rc<usize>` |
ff7c6d11 XL |
20 | |
21 | error: aborting due to 2 previous errors | |
22 | ||
0531ce1d | 23 | For more information about this error, try `rustc --explain E0038`. |