diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-09-11 21:25:01 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-09-11 21:25:01 -0700 |
| commit | 8a8f200d102294cf1bd90cdacad995abccda7934 (patch) | |
| tree | 31e99a460697349c403fc5cf4809427303e14804 /src/libcore/pipes.rs | |
| parent | 02b41097e42082a306ca6dbbd79ee9a1d7d35348 (diff) | |
Introduce auto adjustment table to subsume autoderef/autoref/borrowings.
Fixes #3261 Fixes #3443
Diffstat (limited to 'src/libcore/pipes.rs')
| -rw-r--r-- | src/libcore/pipes.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/pipes.rs b/src/libcore/pipes.rs index 1bc706d16d1..570ddfb492a 100644 --- a/src/libcore/pipes.rs +++ b/src/libcore/pipes.rs @@ -1177,7 +1177,7 @@ type SharedChan<T: Send> = unsafe::Exclusive<Chan<T>>; impl<T: Send> SharedChan<T>: Channel<T> { fn send(+x: T) { let mut xx = Some(move x); - do self.with |chan| { + do self.with_imm |chan| { let mut x = None; x <-> xx; chan.send(option::unwrap(move x)) @@ -1186,7 +1186,7 @@ impl<T: Send> SharedChan<T>: Channel<T> { fn try_send(+x: T) -> bool { let mut xx = Some(move x); - do self.with |chan| { + do self.with_imm |chan| { let mut x = None; x <-> xx; chan.try_send(option::unwrap(move x)) |
