1 error[E0038]: the trait `Trait` cannot be made into an object
2 --> $DIR/wf-convert-unsafe-trait-obj-box.rs:16:33
4 LL | trait Trait: Sized {}
5 | ----- ----- ...because it requires `Self: Sized`
7 | this trait cannot be made into an object...
9 LL | let t_box: Box<dyn Trait> = Box::new(S);
10 | ^^^^^^^^^^^ the trait `Trait` cannot be made into an object
12 = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<std::boxed::Box<dyn Trait>>` for `std::boxed::Box<S>`
13 = note: required by cast to type `std::boxed::Box<dyn Trait>`
15 error[E0038]: the trait `Trait` cannot be made into an object
16 --> $DIR/wf-convert-unsafe-trait-obj-box.rs:17:15
18 LL | trait Trait: Sized {}
19 | ----- ----- ...because it requires `Self: Sized`
21 | this trait cannot be made into an object...
23 LL | takes_box(Box::new(S));
24 | ^^^^^^^^^^^ the trait `Trait` cannot be made into an object
26 = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<std::boxed::Box<dyn Trait>>` for `std::boxed::Box<S>`
27 = note: required by cast to type `std::boxed::Box<(dyn Trait + 'static)>`
29 error[E0038]: the trait `Trait` cannot be made into an object
30 --> $DIR/wf-convert-unsafe-trait-obj-box.rs:15:5
32 LL | trait Trait: Sized {}
33 | ----- ----- ...because it requires `Self: Sized`
35 | this trait cannot be made into an object...
37 LL | Box::new(S) as Box<dyn Trait>;
38 | ^^^^^^^^^^^ the trait `Trait` cannot be made into an object
40 = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<std::boxed::Box<dyn Trait>>` for `std::boxed::Box<S>`
41 = note: required by cast to type `std::boxed::Box<dyn Trait>`
43 error: aborting due to 3 previous errors
45 For more information about this error, try `rustc --explain E0038`.