|
| 1 | +error[E0277]: the trait bound `W<(dyn A + 'static)>: A` is not satisfied |
| 2 | + --> $DIR/ptr-to-trait-obj-wrap.rs:9:5 |
| 3 | + | |
| 4 | +LL | a as _ |
| 5 | + | ^ the trait `A` is not implemented for `W<(dyn A + 'static)>` |
| 6 | + | |
| 7 | +help: this trait has no implementations, consider adding one |
| 8 | + --> $DIR/ptr-to-trait-obj-wrap.rs:3:1 |
| 9 | + | |
| 10 | +LL | trait A {} |
| 11 | + | ^^^^^^^ |
| 12 | + = note: required for the cast from `*const W<(dyn A + 'static)>` to `*const dyn A` |
| 13 | + |
| 14 | +error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time |
| 15 | + --> $DIR/ptr-to-trait-obj-wrap.rs:9:5 |
| 16 | + | |
| 17 | +LL | a as _ |
| 18 | + | ^ doesn't have a size known at compile-time |
| 19 | + | |
| 20 | + = help: within `W<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)` |
| 21 | +note: required because it appears within the type `W<(dyn A + 'static)>` |
| 22 | + --> $DIR/ptr-to-trait-obj-wrap.rs:5:8 |
| 23 | + | |
| 24 | +LL | struct W<T: ?Sized>(T); |
| 25 | + | ^ |
| 26 | + = note: required for the cast from `*const W<(dyn A + 'static)>` to `*const dyn A` |
| 27 | + |
| 28 | +error[E0277]: the trait bound `W<(dyn A + 'static)>: A` is not satisfied |
| 29 | + --> $DIR/ptr-to-trait-obj-wrap.rs:15:5 |
| 30 | + | |
| 31 | +LL | a as _ |
| 32 | + | ^ the trait `A` is not implemented for `W<(dyn A + 'static)>` |
| 33 | + | |
| 34 | +help: this trait has no implementations, consider adding one |
| 35 | + --> $DIR/ptr-to-trait-obj-wrap.rs:3:1 |
| 36 | + | |
| 37 | +LL | trait A {} |
| 38 | + | ^^^^^^^ |
| 39 | + = note: required for the cast from `*const W<W<(dyn A + 'static)>>` to `*const W<dyn A>` |
| 40 | + |
| 41 | +error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time |
| 42 | + --> $DIR/ptr-to-trait-obj-wrap.rs:15:5 |
| 43 | + | |
| 44 | +LL | a as _ |
| 45 | + | ^ doesn't have a size known at compile-time |
| 46 | + | |
| 47 | + = help: within `W<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)` |
| 48 | +note: required because it appears within the type `W<(dyn A + 'static)>` |
| 49 | + --> $DIR/ptr-to-trait-obj-wrap.rs:5:8 |
| 50 | + | |
| 51 | +LL | struct W<T: ?Sized>(T); |
| 52 | + | ^ |
| 53 | + = note: required for the cast from `*const W<W<(dyn A + 'static)>>` to `*const W<dyn A>` |
| 54 | + |
| 55 | +error: aborting due to 4 previous errors |
| 56 | + |
| 57 | +For more information about this error, try `rustc --explain E0277`. |
0 commit comments