diff options
| author | Ben Striegel <ben.striegel@gmail.com> | 2012-11-13 21:38:18 -0500 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-11-14 12:40:44 -0800 |
| commit | 28c7a251514919a2d7bdf6c67b8edf5eed9043db (patch) | |
| tree | f0d0d00a6dcb5b5d645779cc063280818249952b /src/libstd/future.rs | |
| parent | 8336cad95deb79a3c3b3ad5b5496a314711d175e (diff) | |
| download | rust-28c7a251514919a2d7bdf6c67b8edf5eed9043db.tar.gz rust-28c7a251514919a2d7bdf6c67b8edf5eed9043db.zip | |
Convert libstd to use the Drop trait
Diffstat (limited to 'src/libstd/future.rs')
| -rw-r--r-- | src/libstd/future.rs | 8 |
1 files changed, 5 insertions, 3 deletions
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<A> { /*priv*/ mut state: FutureState<A>, +} - // 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<A> Future<A> : Drop { + fn finalize() {} } priv enum FutureState<A> { |
