Traits such as QueueStateT have many methods which take a generic M: GuestMemory type parameter, and expect a &M argument. However, due to how implicit trait bounds work in Rust, those M: GuestMemory are actually M: GuestMemory + Sized, even if M doesn't actually have to be Sized to pass a reference to it. Callers of these methods have to propagate the Sized bound to any type parameters they have standing for M, which makes things unnecessarily restrictive overall. Fix this by explicitly adding a + ?Sized negative bound where applicable for the M generic type parameter of queue traits.
Traits such as
QueueStateT
have many methods which take a genericM: GuestMemory
type parameter, and expect a&M
argument. However, due to how implicit trait bounds work in Rust, thoseM: GuestMemory
are actuallyM: GuestMemory + Sized
, even ifM
doesn't actually have to beSized
to pass a reference to it. Callers of these methods have to propagate theSized
bound to any type parameters they have standing forM
, which makes things unnecessarily restrictive overall. Fix this by explicitly adding a+ ?Sized
negative bound where applicable for theM
generic type parameter of queue traits.