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