diff --git a/src/libsyntax/ext/deriving/clone.rs b/src/libsyntax/ext/deriving/clone.rs index fccc67bf220..f6b8c00e761 100644 --- a/src/libsyntax/ext/deriving/clone.rs +++ b/src/libsyntax/ext/deriving/clone.rs @@ -60,7 +60,7 @@ fn cs_clone( cx.ident_of("Clone"), cx.ident_of("clone"), ]; - let subcall = |field: &FieldInfo| { + let subcall = |&: field: &FieldInfo| { let args = vec![cx.expr_addr_of(field.span, field.self_.clone())]; cx.expr_call_global(field.span, fn_path.clone(), args) diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index ea305642f66..5d5b56d444f 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -25,6 +25,7 @@ #![allow(unknown_features)] #![feature(macro_rules, globs, default_type_params, phase, slicing_syntax)] #![feature(quote, unsafe_destructor, import_shadowing)] +#![feature(unboxed_closures)] extern crate arena; extern crate fmt_macros; diff --git a/src/libsyntax/owned_slice.rs b/src/libsyntax/owned_slice.rs index 43b428b5a1c..8e418e46921 100644 --- a/src/libsyntax/owned_slice.rs +++ b/src/libsyntax/owned_slice.rs @@ -49,7 +49,7 @@ impl OwnedSlice { self.into_vec().into_iter() } - pub fn map(&self, f: |&T| -> U) -> OwnedSlice { + pub fn map U>(&self, f: F) -> OwnedSlice { self.iter().map(f).collect() } }