From ce08025be28869805e0a0b7c643a9655f548c1b5 Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Thu, 12 Dec 2019 15:26:04 -0500 Subject: [PATCH] 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! --- src/phantom-data.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/phantom-data.md b/src/phantom-data.md index fe63606..58ee61d 100644 --- a/src/phantom-data.md +++ b/src/phantom-data.md @@ -96,9 +96,7 @@ Here’s 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` | - | contravariant (*) | +| `PhantomData` | - | contravariant | | `PhantomData T>` | - | variant | | `PhantomData T>` | - | invariant | | `PhantomData>` | invariant | - | - -(*) If contravariance gets scrapped, this would be invariant.