From e132f0bc8e7ac08cad0f2e2cdd55841d0576cf61 Mon Sep 17 00:00:00 2001 From: Alexis Beingessner Date: Fri, 19 Jun 2015 13:55:01 -0700 Subject: [PATCH] add note for future type-system adventurers --- src/libcore/ptr.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 31cdb6093c8..f2792a525d6 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -512,6 +512,11 @@ impl PartialOrd for *mut T { #[unstable(feature = "unique", reason = "needs an RFC to flesh out design")] pub struct Unique { pointer: NonZero<*const T>, + // NOTE: this marker has no consequences for variance, but is necessary + // for dropck to understand that we logically own a `T`. + // + // For details, see: + // https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md#phantom-data _marker: PhantomData, }