Pin stabilization: fix doctests

This commit is contained in:
Taylor Cramer 2018-12-18 10:20:53 -08:00
parent 610bcaf6f3
commit 3005bf360d
2 changed files with 1 additions and 4 deletions

View File

@ -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;
///

View File

@ -43,8 +43,6 @@
//! # Examples
//!
//! ```rust
//! #![feature(pin)]
//!
//! use std::pin::Pin;
//! use std::marker::PhantomPinned;
//! use std::ptr::NonNull;
@ -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
//! }