We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4cf7dc5 + e132f0b commit f50ae67Copy full SHA for f50ae67
src/libcore/ptr.rs
@@ -512,6 +512,11 @@ impl<T: ?Sized> PartialOrd for *mut T {
512
#[unstable(feature = "unique", reason = "needs an RFC to flesh out design")]
513
pub struct Unique<T: ?Sized> {
514
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
520
_marker: PhantomData<T>,
521
}
522
0 commit comments