Skip to content

Commit

Permalink
Merge pull request #197 from JOE1994/patch-1
Browse files Browse the repository at this point in the history
(minor) Add backticks around type names
  • Loading branch information
Centril committed Feb 17, 2020
2 parents 7d04d85 + e381215 commit 71241f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/subtyping.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ to trying to explain:
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:

* Vec and all other owning pointers and collections follow the same logic as Box
* Cell and all other interior mutability types follow the same logic as UnsafeCell
* `*const` follows the logic of `&T`
* `*mut` follows the logic of `&mut T` (or `UnsafeCell<T>`)
* `Vec<T>` and all other owning pointers and collections follow the same logic as `Box<T>`
* `Cell<T>` and all other interior mutability types follow the same logic as `UnsafeCell<T>`
* `*const T` follows the logic of `&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
> a function, which is why it really doesn't come up much in practice. Invoking
Expand Down

0 comments on commit 71241f4

Please sign in to comment.