Skip to content

Commit c070571

Browse files
olsonjefferybrson
authored andcommitted
---
yaml --- r: 28399 b: refs/heads/try c: 02ddbad h: refs/heads/master i: 28397: c8248b1 28395: 634e837 28391: 5c60f70 28383: 0e50cf5 v: v3
1 parent 5158fd1 commit c070571

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
@@ -2,7 +2,7 @@
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5-
refs/heads/try: 27129c6aba153299100887de5c8643cbe3e9b8ef
5+
refs/heads/try: 02ddbadc10d19a5cfa2dd6f8de89068bf4dfb852
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df

branches/try/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/try/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)