From f817d1960a4d495a20689bc7ed22847561afd216 Mon Sep 17 00:00:00 2001 From: Daiki Mizukami Date: Tue, 10 Apr 2018 17:13:32 +0900 Subject: [PATCH 1/2] std: Mark `ptr::Unique` with `#[doc(hidden)]` --- src/libcore/ptr.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 5a54de06b5ef2..a1307a6d5996e 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -2511,6 +2511,7 @@ impl PartialOrd for *mut T { reason = "use NonNull instead and consider PhantomData \ (if you also use #[may_dangle]), Send, and/or Sync")] #[allow(deprecated)] +#[doc(hidden)] pub struct Unique { pointer: NonZero<*const T>, // NOTE: this marker has no consequences for variance, but is necessary From 54d6bcbf70112ceb0efa4579ab9f6d5673588889 Mon Sep 17 00:00:00 2001 From: Daiki Mizukami Date: Wed, 11 Apr 2018 18:24:47 +0900 Subject: [PATCH 2/2] alloc: Mark `Box::into_unique` with `#[doc(hidden)]` --- src/liballoc/boxed.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 71b53cc88e54d..bf7921ea1a2b5 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -184,6 +184,7 @@ impl Box { #[unstable(feature = "ptr_internals", issue = "0", reason = "use into_raw_non_null instead")] #[inline] + #[doc(hidden)] pub fn into_unique(b: Box) -> Unique { let unique = b.0; mem::forget(b);