about summary refs log tree commit diff
path: root/src/libstd/future.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/future.rs')
-rw-r--r--src/libstd/future.rs29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/libstd/future.rs b/src/libstd/future.rs
index a0312849a35..5e3e64b2f1c 100644
--- a/src/libstd/future.rs
+++ b/src/libstd/future.rs
@@ -54,35 +54,6 @@ pub impl<A:Copy> Future<A> {
 }
 
 pub impl<A> Future<A> {
-    #[cfg(stage0)]
-    fn get_ref(&self) -> &'self A {
-        /*!
-        * Executes the future's closure and then returns a borrowed
-        * pointer to the result.  The borrowed pointer lasts as long as
-        * the future.
-        */
-        unsafe {
-            match self.state {
-                Forced(ref mut v) => { return cast::transmute(v); }
-                Evaluating => fail!(~"Recursive forcing of future!"),
-                Pending(_) => {}
-            }
-
-            let mut state = Evaluating;
-            self.state <-> state;
-            match state {
-                Forced(_) | Evaluating => fail!(~"Logic error."),
-                Pending(f) => {
-                    self.state = Forced(f());
-                    self.get_ref()
-                }
-            }
-        }
-    }
-
-    #[cfg(stage1)]
-    #[cfg(stage2)]
-    #[cfg(stage3)]
     fn get_ref<'a>(&'a self) -> &'a A {
         /*!
         * Executes the future's closure and then returns a borrowed