Skip to content

Commit 3f55a3d

Browse files
olsonjefferybrson
authored andcommitted
---
yaml --- r: 30423 b: refs/heads/incoming c: 6d84d86 h: refs/heads/master i: 30421: 2391af3 30419: 834ad49 30415: 222258d v: v3
1 parent 8648064 commit 3f55a3d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 2ed00ff9286a26119168e08f25cb33f25d39ef33
9+
refs/heads/incoming: 6d84d867360c99a8664118ff44c58c0f838a4cfc
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libcore/future.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct Future<A> {
4343
priv enum FutureState<A> {
4444
Pending(fn~() -> A),
4545
Evaluating,
46-
Forced(A)
46+
Forced(~A)
4747
}
4848

4949
/// Methods on the `future` type
@@ -75,7 +75,7 @@ fn from_value<A>(+val: A) -> Future<A> {
7575
* not block.
7676
*/
7777

78-
Future {state: Forced(val)}
78+
Future {state: Forced(~val)}
7979
}
8080

8181
fn from_port<A:Send>(+port: future_pipe::client::waiting<A>) -> Future<A> {
@@ -139,7 +139,7 @@ fn get_ref<A>(future: &r/Future<A>) -> &r/A {
139139

140140
match future.state {
141141
Forced(ref v) => { // v here has type &A, but with a shorter lifetime.
142-
return unsafe{ copy_lifetime(future, v) }; // ...extend it.
142+
return unsafe{ copy_lifetime(future, &**v) }; // ...extend it.
143143
}
144144
Evaluating => {
145145
fail ~"Recursive forcing of future!";
@@ -154,7 +154,7 @@ fn get_ref<A>(future: &r/Future<A>) -> &r/A {
154154
fail ~"Logic error.";
155155
}
156156
Pending(move f) => {
157-
future.state = Forced(f());
157+
future.state = Forced(~f());
158158
return get_ref(future);
159159
}
160160
}

0 commit comments

Comments
 (0)