follow-up to review from Centril

pull/197/head
Youngsuk Kim 5 years ago committed by GitHub
parent d37282bfff
commit e3812150dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -183,10 +183,10 @@ to trying to explain:
The types with \*'s are the ones we will be focusing on, as they are in The types with \*'s are the ones we will be focusing on, as they are in
some sense "fundamental". All the others can be understood by analogy to the others: some sense "fundamental". All the others can be understood by analogy to the others:
* `Vec` and all other owning pointers and collections follow the same logic as `Box` * `Vec<T>` and all other owning pointers and collections follow the same logic as `Box<T>`
* `Cell` and all other interior mutability types follow the same logic as `UnsafeCell` * `Cell<T>` and all other interior mutability types follow the same logic as `UnsafeCell<T>`
* `*const` follows the logic of `&T` * `*const T` follows the logic of `&T`
* `*mut` follows the logic of `&mut T` (or `UnsafeCell<T>`) * `*mut T` follows the logic of `&mut T` (or `UnsafeCell<T>`)
> 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

Loading…
Cancel
Save