From 202b8dcdc420d8b109fbd5260ea2e2be0a5b7faf Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 17 Apr 2013 18:05:17 -0400 Subject: adapt to snapshot --- src/libstd/future.rs | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'src/libstd/future.rs') diff --git a/src/libstd/future.rs b/src/libstd/future.rs index f59abfa81ca..c3fc16bdf70 100644 --- a/src/libstd/future.rs +++ b/src/libstd/future.rs @@ -54,35 +54,6 @@ pub impl Future { } pub impl Future { - #[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 -- cgit 1.4.1-3-g733a5