Skip to content

Commit

Permalink
Rollup merge of rust-lang#49858 - dmizuk:unique-doc-hidden, r=stevekl…
Browse files Browse the repository at this point in the history
…abnik

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

`Unique` is now perma-unstable, so let's hide its docs.
  • Loading branch information
kennytm authored Apr 27, 2018
2 parents 3c43aa5 + 54d6bcb commit a18e7a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/libcore/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a18e7a6

Please sign in to comment.