diff --git a/src/libcore/future.rs b/src/libcore/future.rs
index 82deaf895376..48fad44ff471 100644
--- a/src/libcore/future.rs
+++ b/src/libcore/future.rs
@@ -33,7 +33,11 @@ export future_pipe;
#[doc = "The future type"]
struct Future {
- /*priv*/ mut state: FutureState,
+ /*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 {}
}
priv enum FutureState {
@@ -88,7 +92,7 @@ fn from_port(+port: future_pipe::client::waiting) -> Future {
port_ <-> *port;
let port = option::unwrap(port_);
match recv(port) {
- future_pipe::completed(move data) => data
+ future_pipe::completed(move data) => data
}
}
}
diff --git a/src/libcore/unsafe.rs b/src/libcore/unsafe.rs
index 5539aa7d89e4..6f2e3f94ca2b 100644
--- a/src/libcore/unsafe.rs
+++ b/src/libcore/unsafe.rs
@@ -415,13 +415,13 @@ mod tests {
for uint::range(0u, num_tasks) |_i| {
let total = total.clone();
- futures += ~[future::spawn(|| {
+ vec::push(futures, future::spawn(|| {
for uint::range(0u, count) |_i| {
do total.with |count| {
**count += 1u;
}
}
- })];
+ }));
};
for futures.each |f| { f.get() }