mirror of https://github.com/rust-lang/rust.git
60 lines
2.5 KiB
Plaintext
60 lines
2.5 KiB
Plaintext
error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known
|
|
--> $DIR/pretty-print-opaque.rs:35:26
|
|
|
|
|
LL | pub fn pointeesized() -> Box<impl Tr + PointeeSized> {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a known size
|
|
|
|
|
= help: the trait `MetaSized` is not implemented for `impl Tr + PointeeSized`
|
|
note: required by a bound in `Box`
|
|
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
|
|
|
error[E0277]: the size for values of type `impl Tr + MetaSized` cannot be known at compilation time
|
|
--> $DIR/pretty-print-opaque.rs:20: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 + MetaSized`
|
|
= note: required for the cast from `Box<impl Tr + MetaSized>` to `Box<dyn Tr>`
|
|
|
|
error[E0277]: the size for values of type `impl Tr + MetaSized` cannot be known at compilation time
|
|
--> $DIR/pretty-print-opaque.rs:29: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 + MetaSized`
|
|
= note: required for the cast from `Box<impl Tr + MetaSized>` to `Box<dyn Tr>`
|
|
|
|
error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known
|
|
--> $DIR/pretty-print-opaque.rs:38:17
|
|
|
|
|
LL | let x = pointeesized();
|
|
| ^^^^^^^^^^^^^^ doesn't have a known size
|
|
|
|
|
= help: the trait `MetaSized` is not implemented for `impl Tr + PointeeSized`
|
|
note: required by a bound in `Box`
|
|
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
|
|
|
error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known at compilation time
|
|
--> $DIR/pretty-print-opaque.rs:40: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 + PointeeSized`
|
|
= note: required for the cast from `Box<impl Tr + PointeeSized>` to `Box<dyn Tr>`
|
|
|
|
error[E0277]: the size for values of type `impl Tr + PointeeSized` cannot be known
|
|
--> $DIR/pretty-print-opaque.rs:40:30
|
|
|
|
|
LL | let y: Box<dyn Tr> = x;
|
|
| ^ doesn't have a known size
|
|
|
|
|
= help: the trait `MetaSized` is not implemented for `impl Tr + PointeeSized`
|
|
= note: required for the cast from `Box<impl Tr + PointeeSized>` to `Box<dyn Tr>`
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|