Skip to content

Commit b4c85a9

Browse files
committed
Use consistent type parameters in subtyping.md
There is no type parameter `T` in this context, so no reason to use `U` instead of `T` for disambiguation.
1 parent c76a20f commit b4c85a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/subtyping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ If we remember from the above examples,
139139
it was ok for us to treat `&'a T` as a subtype of `&'b T` if `'a <: 'b`,
140140
therefore we can say that `&'a T` is *covariant* over `'a`.
141141

142-
Also, we saw that it was not ok for us to treat `&mut &'a U` as a subtype of `&mut &'b U`,
142+
Also, we saw that it was not ok for us to treat `&mut &'a T` as a subtype of `&mut &'b T`,
143143
therefore we can say that `&mut T` is *invariant* over `T`
144144

145145
Here is a table of some other generic types and their variances:

0 commit comments

Comments
 (0)