Skip to content

Commit ae5ad9b

Browse files
committed
Add a link for the variance table on the reference
1 parent bcfb3b5 commit ae5ad9b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/subtyping.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ some sense "fundamental". All the others can be understood by analogy to the oth
188188
* `*const T` follows the logic of `&T`
189189
* `*mut T` follows the logic of `&mut T` (or `UnsafeCell<T>`)
190190

191+
For more types, see the ["Variance" section][variance-table] on the reference.
192+
193+
[variance-table]: ../reference/subtyping.html#variance
194+
191195
> NOTE: the *only* source of contravariance in the language is the arguments to
192196
> a function, which is why it really doesn't come up much in practice. Invoking
193197
> contravariance involves higher-order programming with function pointers that

0 commit comments

Comments
 (0)