error[E0038]: the trait `Trait` cannot be made into an object
--> $DIR/wf-convert-unsafe-trait-obj.rs:16:25
|
+LL | trait Trait: Sized {}
+ | ----- the trait cannot require that `Self : Sized`
+...
LL | let t: &dyn Trait = &S;
| ^^ the trait `Trait` cannot be made into an object
|
error[E0038]: the trait `Trait` cannot be made into an object
--> $DIR/wf-convert-unsafe-trait-obj.rs:17:17
|
+LL | trait Trait: Sized {}
+ | ----- the trait cannot require that `Self : Sized`
+...
LL | takes_trait(&S);
| ^^ the trait `Trait` cannot be made into an object
|
error[E0038]: the trait `Trait` cannot be made into an object
--> $DIR/wf-convert-unsafe-trait-obj.rs:15:5
|
+LL | trait Trait: Sized {}
+ | ----- the trait cannot require that `Self : Sized`
+...
LL | &S as &dyn Trait;
| ^^ the trait `Trait` cannot be made into an object
|