From 4589597785c4e485db82bc06c2c44ac2ebcced6a Mon Sep 17 00:00:00 2001 From: Ben Striegel Date: Tue, 13 Nov 2012 21:38:18 -0500 Subject: Convert libstd to use the Drop trait --- src/libstd/future.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/libstd/future.rs') diff --git a/src/libstd/future.rs b/src/libstd/future.rs index 503e915cf87..17b487f16de 100644 --- a/src/libstd/future.rs +++ b/src/libstd/future.rs @@ -23,10 +23,12 @@ use cast::copy_lifetime; #[doc = "The future type"] pub struct Future { /*priv*/ mut state: FutureState, +} - // FIXME(#2829) -- futures should not be copyable, because they close - // over fn~'s that have pipes and so forth within! - drop {} +// FIXME(#2829) -- futures should not be copyable, because they close +// over fn~'s that have pipes and so forth within! +impl Future : Drop { + fn finalize() {} } priv enum FutureState { -- cgit 1.4.1-3-g733a5