]> git.proxmox.com Git - rustc.git/blame - src/test/ui/self/arbitrary-self-types-not-object-safe.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / self / arbitrary-self-types-not-object-safe.stderr
CommitLineData
ff7c6d11 1error[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
4LL | fn foo(self: &Rc<Self>) -> usize;
5 | --- method `foo`'s `self` parameter cannot be dispatched on
6...
dc9dc135
XL
7LL | let x = Rc::new(5usize) as Rc<dyn Foo>;
8 | ^^^^^^^^^^^ the trait `Foo` cannot be made into an object
ff7c6d11
XL
9
10error[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
13LL | fn foo(self: &Rc<Self>) -> usize;
14 | --- method `foo`'s `self` parameter cannot be dispatched on
15...
dc9dc135 16LL | 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
21error: aborting due to 2 previous errors
22
0531ce1d 23For more information about this error, try `rustc --explain E0038`.