12 ms·
> Also there's no way (afaik) in Rust to "spell" a non-heap allocated dyn Trait object. &dyn Trait is fine. let i: i32 = 5; let d = &i as &dyn Display;
by steveklabnik 3y ago
> Also there's no way (afaik) in Rust to "spell" a non-heap allocated dyn Trait object.
&dyn Trait is fine.
let i: i32 = 5;
let d = &i as &dyn Display;