diff options
| author | Alexis Beingessner <a.beingessner@gmail.com> | 2015-06-19 13:55:01 -0700 |
|---|---|---|
| committer | Alexis Beingessner <a.beingessner@gmail.com> | 2015-06-19 15:03:39 -0700 |
| commit | e132f0bc8e7ac08cad0f2e2cdd55841d0576cf61 (patch) | |
| tree | f4c9326a955eabb3a91fb9e7cb624ed5f41c77a3 /src/libcore | |
| parent | 2f5683913c9815d9f12494784747f79b0f3b3066 (diff) | |
| download | rust-e132f0bc8e7ac08cad0f2e2cdd55841d0576cf61.tar.gz rust-e132f0bc8e7ac08cad0f2e2cdd55841d0576cf61.zip | |
add note for future type-system adventurers
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/ptr.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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<T: ?Sized> PartialOrd for *mut T { #[unstable(feature = "unique", reason = "needs an RFC to flesh out design")] pub struct Unique<T: ?Sized> { 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<T>, } |
