1 error[E0225]: only auto traits can be used as additional traits in a trait object
2 --> $DIR/bad-sized.rs:4:28
4 LL | let x: Vec<dyn Trait + Sized> = Vec::new();
7 | | additional non-auto trait
8 | | trait alias used in trait object type (additional use)
10 | trait alias used in trait object type (first use)
12 error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
13 --> $DIR/bad-sized.rs:4:12
15 LL | let x: Vec<dyn Trait + Sized> = Vec::new();
16 | ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
18 ::: $SRC_DIR/alloc/src/vec.rs:LL:COL
20 LL | pub struct Vec<T> {
21 | - required by this bound in `std::vec::Vec`
23 = help: the trait `std::marker::Sized` is not implemented for `dyn Trait`
25 error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
26 --> $DIR/bad-sized.rs:4:37
28 LL | let x: Vec<dyn Trait + Sized> = Vec::new();
29 | ^^^^^^^^ doesn't have a size known at compile-time
31 = help: the trait `std::marker::Sized` is not implemented for `dyn Trait`
32 = note: required by `std::vec::Vec::<T>::new`
34 error: aborting due to 3 previous errors
36 Some errors have detailed explanations: E0225, E0277.
37 For more information about an error, try `rustc --explain E0225`.