Merge pull request #177 from petertodd/2019-12-long-live-contravariance

Remove mention of contravariance possibly getting scrapped
pull/180/head
matthewjasper 5 years ago committed by GitHub
commit 3e6e1001dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -96,9 +96,7 @@ Heres a table of all the wonderful ways `PhantomData` could be used:
| `PhantomData<&'a mut T>` | variant | invariant |
| `PhantomData<*const T>` | - | variant |
| `PhantomData<*mut T>` | - | invariant |
| `PhantomData<fn(T)>` | - | contravariant (*) |
| `PhantomData<fn(T)>` | - | contravariant |
| `PhantomData<fn() -> T>` | - | variant |
| `PhantomData<fn(T) -> T>` | - | invariant |
| `PhantomData<Cell<&'a ()>>` | invariant | - |
(*) If contravariance gets scrapped, this would be invariant.

Loading…
Cancel
Save