summary refs log tree commit diff stats
path: root/src/srce.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/srce.rs')
-rw-r--r--src/srce.rs16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/srce.rs b/src/srce.rs
index e263ddc..8015522 100644
--- a/src/srce.rs
+++ b/src/srce.rs
@@ -15,11 +15,9 @@
 //! Funny runtime specialization thing:
 //!
 //! ```rust
-//! #![feature(pin_macro)]
 //! use core::cell::Cell;
 //! use core::marker::PhantomData;
 //! use core::pin::Pin;
-//! use core::pin::pin;
 //!
 //! use qcell::LCell;
 //!
@@ -62,7 +60,7 @@
 //!
 //! fn main() {
 //!     // Create the holder
-//!     let mut holder = pin!(
+//!     let mut holder = Box::pin(
 //!         LCellEnvironment::<IntrusiveLCellKey<MyThing>>::new_with(
 //!             |thing| thing.build(IntrusiveLCell {
 //!                 y: Cell::new(None),
@@ -78,7 +76,7 @@
 //!     });
 //!
 //!     // Coerce to dyn Foo.
-//!     let mut holder: Pin<&mut LCellEnvironment<IntrusiveLCellKey<dyn Foo>>> = holder;
+//!     let mut holder: Pin<Box<LCellEnvironment<IntrusiveLCellKey<dyn Foo>>>> = holder;
 //!
 //!     // Run some rw/mut operations on it.
 //!     holder.as_mut().open_rw(|owner, thing| {
@@ -181,10 +179,7 @@ impl<'k, T> LCellEnvironment<'k, T> where T: Opaque {
     /// # Examples
     ///
     /// ```rust
-    /// #![feature(pin_macro)]
-    ///
     /// use qcell::LCell;
-    /// use core::pin::pin;
     /// 
     /// use selfref::srce::LCellEnvironment;
     /// use selfref::opaque;
@@ -201,7 +196,7 @@ impl<'k, T> LCellEnvironment<'k, T> where T: Opaque {
     /// }
     ///
     /// fn main() {
-    ///     let mut holder = pin!(LCellEnvironment::<'_, FooKey>::new_with(
+    ///     let mut holder = Box::pin(LCellEnvironment::<'_, FooKey>::new_with(
     ///         |foo| foo.build(Foo { foo: LCell::new(Default::default()) })
     ///     ));
     ///     // Actually making our Foo refer to itself.
@@ -239,10 +234,7 @@ impl<'k, T> LCellEnvironment<'k, T> where T: Opaque {
     /// # Examples
     ///
     /// ```rust
-    /// #![feature(pin_macro)]
-    ///
     /// use qcell::LCell;
-    /// use core::pin::pin;
     /// 
     /// use selfref::srce::LCellEnvironment;
     /// use selfref::opaque;
@@ -259,7 +251,7 @@ impl<'k, T> LCellEnvironment<'k, T> where T: Opaque {
     /// }
     ///
     /// fn main() {
-    ///     let holder = pin!(LCellEnvironment::<'_, FooKey>::new_with(
+    ///     let holder = Box::pin(LCellEnvironment::<'_, FooKey>::new_with(
     ///         |foo| foo.build(Foo { foo: LCell::new(Default::default()) })
     ///     ));
     ///     holder.as_ref().open_ro(