4 ms·
Stupid question on `Box<Foo>` vs. `Box<dyn Foo>`: does this syntax apply to any other places where a trait is used as a type parameter? E.g. //do we writ
by Mouse47 8y ago
Stupid question on `Box<Foo>` vs. `Box<dyn Foo>`: does this syntax apply to any other places where a trait is used as a type parameter?
E.g.
//do we write the type of MyBox like 'MyBox<dyn Debug>'?
struct MyBox<T : ?Sized>{
inner: Box<T>
}
- chrismorgan 8y agoYes. The unsized trait object type is being renamed from `Trait` to `dyn Trait`.