diff options
| author | Seth Pink <sethpink@gmail.com> | 2013-02-17 12:41:45 +1000 |
|---|---|---|
| committer | Seth Pink <sethpink@gmail.com> | 2013-02-17 12:41:45 +1000 |
| commit | 60bd4a5385ae39085d82a89ac6bc7bb9cd9b200b (patch) | |
| tree | b3a6e8629f16bf2cfb8503886baf6f20fe5cc9f9 | |
| parent | 1f4c758f9b4d92a209bb1a11b11ac937ad76d161 (diff) | |
| download | rust-60bd4a5385ae39085d82a89ac6bc7bb9cd9b200b.tar.gz rust-60bd4a5385ae39085d82a89ac6bc7bb9cd9b200b.zip | |
Removed more capture claueses.
| -rw-r--r-- | src/librustc/middle/astencode.rs | 2 | ||||
| -rw-r--r-- | src/libstd/par.rs | 6 | ||||
| -rw-r--r-- | src/test/compile-fail/kindck-nonsendable-1.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc/middle/astencode.rs b/src/librustc/middle/astencode.rs index da58062f553..e992c2a3af7 100644 --- a/src/librustc/middle/astencode.rs +++ b/src/librustc/middle/astencode.rs @@ -821,7 +821,7 @@ fn encode_side_tables_for_ii(ecx: @e::encode_ctxt, let ebml_w = copy ebml_w; ast_util::visit_ids_for_inlined_item( ii, - fn@(id: ast::node_id, copy ebml_w) { + fn@(id: ast::node_id) { // Note: this will cause a copy of ebml_w, which is bad as // it has mut fields. But I believe it's harmless since // we generate balanced EBML. diff --git a/src/libstd/par.rs b/src/libstd/par.rs index 3929e8c0ea7..c48f56dd143 100644 --- a/src/libstd/par.rs +++ b/src/libstd/par.rs @@ -107,7 +107,7 @@ pub fn mapi<A: Copy Owned, B: Copy Owned>( { let slices = map_slices(xs, || { let f = fn_factory(); - fn~(base: uint, slice : &[A], copy f) -> ~[B] { + fn~(base: uint, slice : &[A]) -> ~[B] { vec::mapi(slice, |i, x| { f(i + base, x) }) @@ -126,7 +126,7 @@ pub fn alli<A: Copy Owned>( { do vec::all(map_slices(xs, || { let f = fn_factory(); - fn~(base: uint, slice : &[A], copy f) -> bool { + fn~(base: uint, slice : &[A]) -> bool { vec::alli(slice, |i, x| { f(i + base, x) }) @@ -140,7 +140,7 @@ pub fn any<A: Copy Owned>( fn_factory: &fn() -> ~fn(&A) -> bool) -> bool { do vec::any(map_slices(xs, || { let f = fn_factory(); - fn~(_base : uint, slice: &[A], copy f) -> bool { + fn~(_base : uint, slice: &[A]) -> bool { vec::any(slice, |x| f(x)) } })) |x| { *x } diff --git a/src/test/compile-fail/kindck-nonsendable-1.rs b/src/test/compile-fail/kindck-nonsendable-1.rs index c88dae232fa..397b0f682d6 100644 --- a/src/test/compile-fail/kindck-nonsendable-1.rs +++ b/src/test/compile-fail/kindck-nonsendable-1.rs @@ -13,6 +13,6 @@ fn foo(_x: @uint) {} fn main() { let x = @3u; let _ = fn~() { foo(x); }; //~ ERROR value has non-owned type `@uint` - let _ = fn~(copy x) { foo(x); }; //~ ERROR value has non-owned type `@uint` + let _ = fn~() { foo(x); }; //~ ERROR value has non-owned type `@uint` let _ = fn~() { foo(x); }; //~ ERROR value has non-owned type `@uint` } |
