]> git.lizzy.rs Git - rust.git/blob - src/test/ui/arbitrary-self-types-not-object-safe.stderr
Auto merge of #60132 - davidtwco:issue-60075, r=estebank
[rust.git] / src / test / ui / arbitrary-self-types-not-object-safe.stderr
1 error[E0038]: the trait `Foo` cannot be made into an object
2   --> $DIR/arbitrary-self-types-not-object-safe.rs:31:32
3    |
4 LL |     let x = Rc::new(5usize) as Rc<Foo>;
5    |                                ^^^^^^^ the trait `Foo` cannot be made into an object
6    |
7    = note: method `foo`'s receiver cannot be dispatched on
8
9 error[E0038]: the trait `Foo` cannot be made into an object
10   --> $DIR/arbitrary-self-types-not-object-safe.rs:31:13
11    |
12 LL |     let x = Rc::new(5usize) as Rc<Foo>;
13    |             ^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object
14    |
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>`
17
18 error: aborting due to 2 previous errors
19
20 For more information about this error, try `rustc --explain E0038`.