From b299c2b57db90025cbf59d4b5152c9c37db6bc63 Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Thu, 6 Nov 2014 09:32:37 -0800 Subject: Fallout from stabilization --- src/libsyntax/ast_map/mod.rs | 2 +- src/libsyntax/config.rs | 3 +-- src/libsyntax/ext/base.rs | 2 +- src/libsyntax/ext/format.rs | 2 +- src/libsyntax/owned_slice.rs | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ast_map/mod.rs b/src/libsyntax/ast_map/mod.rs index 8a2202d28d5..6b97b931ef7 100644 --- a/src/libsyntax/ast_map/mod.rs +++ b/src/libsyntax/ast_map/mod.rs @@ -87,7 +87,7 @@ impl<'a, T: Copy> Iterator for Values<'a, T> { /// The type of the iterator used by with_path. pub type PathElems<'a, 'b> = iter::Chain, LinkedPath<'b>>; -pub fn path_to_string>(mut path: PI) -> String { +pub fn path_to_string>(path: PI) -> String { let itr = token::get_ident_interner(); path.fold(String::new(), |mut s, e| { diff --git a/src/libsyntax/config.rs b/src/libsyntax/config.rs index 257bfd69f43..4f718555d53 100644 --- a/src/libsyntax/config.rs +++ b/src/libsyntax/config.rs @@ -131,7 +131,7 @@ fn fold_item_underscore(cx: &mut Context, item: ast::Item_) -> ast::Item_ { ast::ItemStruct(fold_struct(cx, def), generics) } ast::ItemEnum(def, generics) => { - let mut variants = def.variants.into_iter().filter_map(|v| { + let variants = def.variants.into_iter().filter_map(|v| { if !(cx.in_cfg)(v.node.attrs.as_slice()) { None } else { @@ -273,4 +273,3 @@ fn in_cfg(diagnostic: &SpanHandler, cfg: &[P], attrs: &[ast::Attr attr::cfg_matches(diagnostic, cfg, &*mis[0]) }) } - diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 1cbc2b98c93..8d0d399fa31 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -210,7 +210,7 @@ pub struct MacItems { } impl MacItems { - pub fn new>>(mut it: I) -> Box { + pub fn new>>(it: I) -> Box { box MacItems { items: it.collect() } as Box } } diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs index b04a800a32d..490246f8246 100644 --- a/src/libsyntax/ext/format.rs +++ b/src/libsyntax/ext/format.rs @@ -580,7 +580,7 @@ impl<'a, 'b> Context<'a, 'b> { let slicename = self.ecx.ident_of("__args_vec"); { let args = names.into_iter().map(|a| a.unwrap()); - let mut args = locals.into_iter().chain(args); + let args = locals.into_iter().chain(args); let args = self.ecx.expr_vec_slice(self.fmtsp, args.collect()); lets.push(self.ecx.stmt_let(self.fmtsp, false, slicename, args)); } diff --git a/src/libsyntax/owned_slice.rs b/src/libsyntax/owned_slice.rs index f622e2d6112..b31b20c80c2 100644 --- a/src/libsyntax/owned_slice.rs +++ b/src/libsyntax/owned_slice.rs @@ -145,7 +145,7 @@ impl PartialEq for OwnedSlice { impl Eq for OwnedSlice {} impl FromIterator for OwnedSlice { - fn from_iter>(mut iter: I) -> OwnedSlice { + fn from_iter>(iter: I) -> OwnedSlice { OwnedSlice::from_vec(iter.collect()) } } -- cgit 1.4.1-3-g733a5