rust/tests/ui/object-safety/assoc_type_bounds_implicit_...

21 lines
769 B
Plaintext

error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
--> $DIR/assoc_type_bounds_implicit_sized.rs:9:17
|
LL | type Item = dyn Trait;
| ^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Trait + 'static)`
note: required by a bound in `TraitWithAType::Item`
--> $DIR/assoc_type_bounds_implicit_sized.rs:4:5
|
LL | type Item;
| ^^^^^^^^^^ required by this bound in `TraitWithAType::Item`
help: consider relaxing the implicit `Sized` restriction
|
LL | type Item: ?Sized;
| ++++++++
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.