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
QueueStateThave many methods which take a genericM: GuestMemorytype parameter, and expect a&Margument. However, due to how implicit trait bounds work in Rust, thoseM: GuestMemoryare actuallyM: GuestMemory + Sized, even ifMdoesn't actually have to beSizedto pass a reference to it. Callers of these methods have to propagate theSizedbound to any type parameters they have standing forM, which makes things unnecessarily restrictive overall. Fix this by explicitly adding a+ ?Sizednegative bound where applicable for theMgeneric type parameter of queue traits.