Skip to content

Commit

Permalink
Pin stabilization: fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
cramertj committed Dec 22, 2018
1 parent 610bcaf commit 3005bf3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion src/libcore/marker.rs
Expand Up @@ -621,7 +621,6 @@ unsafe impl<T: ?Sized> Freeze for &mut T {}
/// So this, for example, can only be done on types implementing `Unpin`:
///
/// ```rust
/// #![feature(pin)]
/// use std::mem::replace;
/// use std::pin::Pin;
///
Expand Down
4 changes: 1 addition & 3 deletions src/libcore/pin.rs
Expand Up @@ -43,8 +43,6 @@
//! # Examples
//!
//! ```rust
//! #![feature(pin)]
//!
//! use std::pin::Pin;
//! use std::marker::PhantomPinned;
//! use std::ptr::NonNull;
Expand Down Expand Up @@ -78,7 +76,7 @@
//! // we know this is safe because modifying a field doesn't move the whole struct
//! unsafe {
//! let mut_ref: Pin<&mut Self> = Pin::as_mut(&mut boxed);
//! Pin::get_mut_unchecked(mut_ref).slice = slice;
//! Pin::get_unchecked_mut(mut_ref).slice = slice;
//! }
//! boxed
//! }
Expand Down

0 comments on commit 3005bf3

Please sign in to comment.