Skip to content

Commit 2264a06

Browse files
olsonjefferybrson
authored andcommitted
---
yaml --- r: 32483 b: refs/heads/dist-snap c: 02ddbad h: refs/heads/master i: 32481: cc27e8e 32479: 8615bd1 v: v3
1 parent c1197c5 commit 2264a06

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 27129c6aba153299100887de5c8643cbe3e9b8ef
10+
refs/heads/dist-snap: 02ddbadc10d19a5cfa2dd6f8de89068bf4dfb852
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/libcore/future.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ export future_pipe;
3333

3434
#[doc = "The future type"]
3535
struct Future<A> {
36-
/*priv*/ mut state: FutureState<A>,
36+
/*priv*/ mut state: FutureState<A>;
37+
38+
// FIXME(#2829) -- futures should not be copyable, because they close
39+
// over fn~'s that have pipes and so forth within!
40+
drop {}
3741
}
3842

3943
priv enum FutureState<A> {
@@ -88,7 +92,7 @@ fn from_port<A:Send>(+port: future_pipe::client::waiting<A>) -> Future<A> {
8892
port_ <-> *port;
8993
let port = option::unwrap(port_);
9094
match recv(port) {
91-
future_pipe::completed(move data) => data
95+
future_pipe::completed(move data) => data
9296
}
9397
}
9498
}

branches/dist-snap/src/libcore/unsafe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,13 @@ mod tests {
415415

416416
for uint::range(0u, num_tasks) |_i| {
417417
let total = total.clone();
418-
futures += ~[future::spawn(|| {
418+
vec::push(futures, future::spawn(|| {
419419
for uint::range(0u, count) |_i| {
420420
do total.with |count| {
421421
**count += 1u;
422422
}
423423
}
424-
})];
424+
}));
425425
};
426426

427427
for futures.each |f| { f.get() }

0 commit comments

Comments
 (0)