We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 85fe892 + b4c85a9 commit dd31c8dCopy full SHA for dd31c8d
src/subtyping.md
@@ -139,7 +139,7 @@ If we remember from the above examples,
139
it was ok for us to treat `&'a T` as a subtype of `&'b T` if `'a <: 'b`,
140
therefore we can say that `&'a T` is *covariant* over `'a`.
141
142
-Also, we saw that it was not ok for us to treat `&mut &'a U` as a subtype of `&mut &'b U`,
+Also, we saw that it was not ok for us to treat `&mut &'a T` as a subtype of `&mut &'b T`,
143
therefore we can say that `&mut T` is *invariant* over `T`
144
145
Here is a table of some other generic types and their variances:
0 commit comments