Closed
Description
I'm reading through the subtyping and variance chapter and the following text confused me:
Also, we saw that it was not ok for us to treat
`&mut &'a U` as a subtype of `&mut &'b U`,
therefore we can say that `&mut T` is *invariant* over `T`
Why is U introduced in the premise here and then not used in the conclusion? Shouldn't the premise just use T again, or if for some reason no, shouldn't the conclusion at least use U?
Metadata
Metadata
Assignees
Labels
No labels