Add a link for the variance table on the reference

pull/278/head
Yuki Okushi 4 years ago
parent bcfb3b58a1
commit ae5ad9b7ad

@ -188,6 +188,10 @@ some sense "fundamental". All the others can be understood by analogy to the oth
* `*const T` follows the logic of `&T` * `*const T` follows the logic of `&T`
* `*mut T` follows the logic of `&mut T` (or `UnsafeCell<T>`) * `*mut T` follows the logic of `&mut T` (or `UnsafeCell<T>`)
For more types, see the ["Variance" section][variance-table] on the reference.
[variance-table]: ../reference/subtyping.html#variance
> NOTE: the *only* source of contravariance in the language is the arguments to > NOTE: the *only* source of contravariance in the language is the arguments to
> a function, which is why it really doesn't come up much in practice. Invoking > a function, which is why it really doesn't come up much in practice. Invoking
> contravariance involves higher-order programming with function pointers that > contravariance involves higher-order programming with function pointers that

Loading…
Cancel
Save