blob: 77ca118471db5d6d75c506c69902cbce7f35e8f0 [file] [log] [blame]
error[E0038]: the trait `Foo` cannot be made into an object
--> $DIR/arbitrary-self-types-not-object-safe.rs:40:32
|
LL | let x = Rc::new(5usize) as Rc<Foo>;
| ^^^^^^^ the trait `Foo` cannot be made into an object
|
= note: method `foo`'s receiver cannot be dispatched on
error[E0038]: the trait `Foo` cannot be made into an object
--> $DIR/arbitrary-self-types-not-object-safe.rs:40:13
|
LL | let x = Rc::new(5usize) as Rc<Foo>;
| ^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object
|
= note: method `foo`'s receiver cannot be dispatched on
= note: required because of the requirements on the impl of `std::ops::CoerceUnsized<std::rc::Rc<dyn Foo>>` for `std::rc::Rc<usize>`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0038`.