Pin stabilization: fix doctests
This commit is contained in:
parent
610bcaf6f3
commit
3005bf360d
2 changed files with 1 additions and 4 deletions
|
@ -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;
|
||||
///
|
||||
|
|
|
@ -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
|
||||
//! }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue