]> git.lizzy.rs Git - rust.git/blob - src/test/ui/arbitrary-self-types-not-object-safe.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[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:40:33
3    |
4 LL |     let x = Box::new(5usize) as Box<Foo>;
5    |                                 ^^^^^^^^ the trait `Foo` cannot be made into an object
6    |
7    = note: method `foo` has a non-standard `self` type
8
9 error[E0038]: the trait `Foo` cannot be made into an object
10   --> $DIR/arbitrary-self-types-not-object-safe.rs:40:13
11    |
12 LL |     let x = Box::new(5usize) as Box<Foo>;
13    |             ^^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object
14    |
15    = note: method `foo` has a non-standard `self` type
16    = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<std::boxed::Box<dyn Foo>>` for `std::boxed::Box<usize>`
17
18 error: aborting due to 2 previous errors
19
20 For more information about this error, try `rustc --explain E0038`.