Skip to content

Commit f50ae67

Browse files
committed
Rollup merge of #26439 - Gankro:marker, r=pnkfelix
r? @pnkfelix
2 parents 4cf7dc5 + e132f0b commit f50ae67

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/libcore/ptr.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,11 @@ impl<T: ?Sized> PartialOrd for *mut T {
512512
#[unstable(feature = "unique", reason = "needs an RFC to flesh out design")]
513513
pub struct Unique<T: ?Sized> {
514514
pointer: NonZero<*const T>,
515+
// NOTE: this marker has no consequences for variance, but is necessary
516+
// for dropck to understand that we logically own a `T`.
517+
//
518+
// For details, see:
519+
// https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md#phantom-data
515520
_marker: PhantomData<T>,
516521
}
517522

0 commit comments

Comments
 (0)