Rollup merge of #49858 - dmizuk:unique-doc-hidden, r=steveklabnik

std: Mark `ptr::Unique` with `#[doc(hidden)]`

`Unique` is now perma-unstable, so let's hide its docs.
This commit is contained in:
kennytm 2018-04-28 03:32:11 +08:00 committed by GitHub
commit a18e7a6e83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -184,6 +184,7 @@ impl<T: ?Sized> Box<T> {
#[unstable(feature = "ptr_internals", issue = "0", reason = "use into_raw_non_null instead")]
#[inline]
#[doc(hidden)]
pub fn into_unique(b: Box<T>) -> Unique<T> {
let unique = b.0;
mem::forget(b);

View File

@ -2513,6 +2513,7 @@ impl<T: ?Sized> PartialOrd for *mut T {
reason = "use NonNull instead and consider PhantomData<T> \
(if you also use #[may_dangle]), Send, and/or Sync")]
#[allow(deprecated)]
#[doc(hidden)]
pub struct Unique<T: ?Sized> {
pointer: NonZero<*const T>,
// NOTE: this marker has no consequences for variance, but is necessary