Remove mention of contravariance possibly getting scrapped

Contravariance is part of stable Rust, and it's a natural outcome of how
`fn(T)` interacts with lifetimes, so it's hard to imagine this ever
going away.

tl;dr: LONG LIVE CONTRAVARIANCE!
pull/177/head
Peter Todd 5 years ago
parent 8be35b201f
commit ce08025be2
No known key found for this signature in database
GPG Key ID: 2481403DA5F091FB

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

Loading…
Cancel
Save