rust/tests/ui/sized-hierarchy/pretty-print-opaque-no-feat.stderr
David Wood 118d4e62c3
middle: print {Meta,Pointee}Sized in opaques
When `sized_hierarchy` is enabled, rustc should print `MetaSized` or
`PointeeSized` instead of `?Sized` in opaques.
2025-06-16 23:04:34 +00:00

13 lines
529 B
Plaintext

error[E0277]: the size for values of type `impl Tr + ?Sized` cannot be known at compilation time
--> $DIR/pretty-print-opaque-no-feat.rs:9:30
|
LL | let y: Box<dyn Tr> = x;
| ^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `impl Tr + ?Sized`
= note: required for the cast from `Box<impl Tr + ?Sized>` to `Box<dyn Tr>`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.