You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if Trait1 and Trait2 are traits, then &mut Trait1+Trait2 <: &mut Trait1. I.e., mutable trait objects are covariant. All other mutable references are invariant, that is &mut T <: &mut T' iff T /equiv T'.
Should trait objects also be invariant?
See also #12470, which is a similar issue but about lifetimes in the same situation (which must be invariant and not contravariant).