Skip to content

Commit dd31c8d

Browse files
authored
Merge pull request #493 from senekor/senekor-rrqpxsznswmt
Use consistent type parameters in subtyping.md
2 parents 85fe892 + b4c85a9 commit dd31c8d

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)