Rust Trait object conversion
The following code won't compile due to two instances of this error: error[E0277]: the trait bound Self: std::marker::Sized is not satisfied I don't understand why Sized is required in this instance as both &self and &Any are pointers and the operation does not require knowledge of the size of the structure that implements the trait, it only requires knowledge of the pointer itself and the type it is converting from and to, which it will have because &self is generic when implemented inside a trait. I think this may be an instance of the compiler enforcing unnecessary constraints and I've