What does `erase T` mean here? "We don't deref it so don't worry about the type, just erase it?"
Would it be a stack allocated, owning version of that, that can be moved? A pure `dyn Trait`?
struct DynFoo<erase T> {
vtable: &mut VTableFoo<T>
ptr: &mut T
}
This is the underlying feature. `dyn` is a bit of an ad-hoc hack around not having this feature.Without trait bounds there isn't much you can do with it anyway besides generic code like this. I guess the question is 'does Rust emit' or elide an unused generic function with unused interior types?
The other major use case is if you've got something like a Vec<T> where several of the helper methods can be erasable. But it's already possible to do this with helper functions--the standard library takes advantage of it--so it's not entirely clear that you need a language-level feature for this use case.