Skip to content

Commit

Permalink
Removed more capture claueses.
Browse files Browse the repository at this point in the history
  • Loading branch information
sp0 committed Feb 17, 2013
1 parent 1f4c758 commit 60bd4a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/librustc/middle/astencode.rs
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/par.rs
Expand Up @@ -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)
})
Expand All @@ -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)
})
Expand All @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/kindck-nonsendable-1.rs
Expand Up @@ -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`
}

6 comments on commit 60bd4a5

@graydon
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

@bors
Copy link
Contributor

@bors bors commented on 60bd4a5 Feb 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 60bd4a5 Feb 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging sethpink/rust/obsolete-capture-clause = 60bd4a5 into auto

@bors
Copy link
Contributor

@bors bors commented on 60bd4a5 Feb 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sethpink/rust/obsolete-capture-clause = 60bd4a5 merged ok, testing candidate = aa8af12

@bors
Copy link
Contributor

@bors bors commented on 60bd4a5 Feb 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 60bd4a5 Feb 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = aa8af12

Please sign in to comment.