File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5
- refs/heads/try: 27129c6aba153299100887de5c8643cbe3e9b8ef
5
+ refs/heads/try: 02ddbadc10d19a5cfa2dd6f8de89068bf4dfb852
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
Original file line number Diff line number Diff line change @@ -33,7 +33,11 @@ export future_pipe;
33
33
34
34
#[ doc = "The future type" ]
35
35
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 { }
37
41
}
38
42
39
43
priv enum FutureState <A > {
@@ -88,7 +92,7 @@ fn from_port<A:Send>(+port: future_pipe::client::waiting<A>) -> Future<A> {
88
92
port_ <-> * port;
89
93
let port = option:: unwrap ( port_) ;
90
94
match recv ( port) {
91
- future_pipe:: completed( move data) => data
95
+ future_pipe:: completed( move data) => data
92
96
}
93
97
}
94
98
}
Original file line number Diff line number Diff line change @@ -415,13 +415,13 @@ mod tests {
415
415
416
416
for uint:: range( 0 u, num_tasks) |_i| {
417
417
let total = total. clone ( ) ;
418
- futures += ~ [ future:: spawn ( || {
418
+ vec :: push ( futures, future:: spawn ( || {
419
419
for uint:: range( 0 u, count) |_i| {
420
420
do total. with |count| {
421
421
* * count += 1 u;
422
422
}
423
423
}
424
- } ) ] ;
424
+ } ) ) ;
425
425
} ;
426
426
427
427
for futures. each |f| { f. get ( ) }
You can’t perform that action at this time.
0 commit comments