]> git.lizzy.rs Git - rust.git/commitdiff
Pin stabilization: fix doctests
authorTaylor Cramer <cramertj@google.com>
Tue, 18 Dec 2018 18:20:53 +0000 (10:20 -0800)
committerTaylor Cramer <cramertj@google.com>
Sat, 22 Dec 2018 04:42:50 +0000 (20:42 -0800)
src/libcore/marker.rs
src/libcore/pin.rs

index 181623f4932ee79099ff343eb59979f1e58a0866..74055a4f8a9b0b65c7a910b4d3588dcaa6e98c44 100644 (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;
 ///
index b55d6a3b9bca0d190301c0b18b1880a51db6ed8a..9073e6e31b1daf4bb57b86162522d27dc49adce7 100644 (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
 //!     }