1 error[E0225]: only auto traits can be used as additional traits in a trait object
2 --> $DIR/bad-sized.rs:4:24
4 LL | let x: Vec<Trait + Sized> = Vec::new();
5 | ^^^^^ non-auto additional trait
7 error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
8 --> $DIR/bad-sized.rs:4:12
10 LL | let x: Vec<Trait + Sized> = Vec::new();
11 | ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
13 = help: the trait `std::marker::Sized` is not implemented for `dyn Trait`
14 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
15 = note: required by `std::vec::Vec`
17 error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
18 --> $DIR/bad-sized.rs:4:33
20 LL | let x: Vec<Trait + Sized> = Vec::new();
21 | ^^^^^^^^ doesn't have a size known at compile-time
23 = help: the trait `std::marker::Sized` is not implemented for `dyn Trait`
24 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
25 = note: required by `<std::vec::Vec<T>>::new`
27 error: aborting due to 3 previous errors
29 Some errors occurred: E0225, E0277.
30 For more information about an error, try `rustc --explain E0225`.