These casts work:
*mut c_void as *mut T // for concrete T
*mut T as *mut c_void // for concrete T
*mut Trait as *mut c_void // for trait Trait
But this doesn't:
*mut c_void as *mut Trait // for trait Trait
It's still sound to make this cast using mem::transmute
, right?