libsyntax: fix fallout

This commit is contained in:
Jorge Aparicio 2014-12-02 14:46:01 -05:00
parent d22acb77b2
commit 5e7469cfe1
3 changed files with 3 additions and 2 deletions

View File

@ -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)

View File

@ -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;

View File

@ -49,7 +49,7 @@ impl<T> OwnedSlice<T> {
self.into_vec().into_iter()
}
pub fn map<U>(&self, f: |&T| -> U) -> OwnedSlice<U> {
pub fn map<U, F: FnMut(&T) -> U>(&self, f: F) -> OwnedSlice<U> {
self.iter().map(f).collect()
}
}