Removed more capture claueses.
This commit is contained in:
parent
1f4c758f9b
commit
60bd4a5385
@ -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.
|
||||
|
@ -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 }
|
||||
|
@ -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`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user