diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-11-06 09:32:37 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-11-25 17:41:54 -0800 |
| commit | b299c2b57db90025cbf59d4b5152c9c37db6bc63 (patch) | |
| tree | f3476a915920ef8a42761cb740dc6f4e1f64844f /src/libsyntax | |
| parent | a86f72d9a2adc6d65f2ba0990caca35c1a3f622d (diff) | |
| download | rust-b299c2b57db90025cbf59d4b5152c9c37db6bc63.tar.gz rust-b299c2b57db90025cbf59d4b5152c9c37db6bc63.zip | |
Fallout from stabilization
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast_map/mod.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/config.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax/ext/base.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/format.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/owned_slice.rs | 2 |
5 files changed, 5 insertions, 6 deletions
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<T> for Values<'a, T> { /// The type of the iterator used by with_path. pub type PathElems<'a, 'b> = iter::Chain<Values<'a, PathElem>, LinkedPath<'b>>; -pub fn path_to_string<PI: Iterator<PathElem>>(mut path: PI) -> String { +pub fn path_to_string<PI: Iterator<PathElem>>(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<ast::MetaItem>], 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<I: Iterator<P<ast::Item>>>(mut it: I) -> Box<MacResult+'static> { + pub fn new<I: Iterator<P<ast::Item>>>(it: I) -> Box<MacResult+'static> { box MacItems { items: it.collect() } as Box<MacResult+'static> } } 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<T: PartialEq> PartialEq for OwnedSlice<T> { impl<T: Eq> Eq for OwnedSlice<T> {} impl<T> FromIterator<T> for OwnedSlice<T> { - fn from_iter<I: Iterator<T>>(mut iter: I) -> OwnedSlice<T> { + fn from_iter<I: Iterator<T>>(iter: I) -> OwnedSlice<T> { OwnedSlice::from_vec(iter.collect()) } } |
