mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
remove unused mut qualifiers
This commit is contained in:
parent
fd702702ee
commit
3484706c38
@ -673,7 +673,7 @@ impl<'a, T> IntoIterator for &'a BinaryHeap<T> where T: Ord {
|
|||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T: Ord> Extend<T> for BinaryHeap<T> {
|
impl<T: Ord> Extend<T> for BinaryHeap<T> {
|
||||||
fn extend<Iter: Iterator<Item=T>>(&mut self, mut iter: Iter) {
|
fn extend<Iter: Iterator<Item=T>>(&mut self, iter: Iter) {
|
||||||
let (lower, _) = iter.size_hint();
|
let (lower, _) = iter.size_hint();
|
||||||
|
|
||||||
self.reserve(lower);
|
self.reserve(lower);
|
||||||
|
@ -934,7 +934,7 @@ impl FromIterator<bool> for Bitv {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl Extend<bool> for Bitv {
|
impl Extend<bool> for Bitv {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn extend<I: Iterator<Item=bool>>(&mut self, mut iterator: I) {
|
fn extend<I: Iterator<Item=bool>>(&mut self, iterator: I) {
|
||||||
let (min, _) = iterator.size_hint();
|
let (min, _) = iterator.size_hint();
|
||||||
self.reserve(min);
|
self.reserve(min);
|
||||||
for element in iterator {
|
for element in iterator {
|
||||||
@ -1141,7 +1141,7 @@ impl FromIterator<uint> for BitvSet {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl Extend<uint> for BitvSet {
|
impl Extend<uint> for BitvSet {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn extend<I: Iterator<Item=uint>>(&mut self, mut iterator: I) {
|
fn extend<I: Iterator<Item=uint>>(&mut self, iterator: I) {
|
||||||
for i in iterator {
|
for i in iterator {
|
||||||
self.insert(i);
|
self.insert(i);
|
||||||
}
|
}
|
||||||
@ -1353,7 +1353,7 @@ impl BitvSet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtually pad other with 0's for equal lengths
|
// virtually pad other with 0's for equal lengths
|
||||||
let mut other_words = {
|
let other_words = {
|
||||||
let (_, result) = match_words(self_bitv, other_bitv);
|
let (_, result) = match_words(self_bitv, other_bitv);
|
||||||
result
|
result
|
||||||
};
|
};
|
||||||
|
@ -846,7 +846,7 @@ impl<K: Ord, V> FromIterator<(K, V)> for BTreeMap<K, V> {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<K: Ord, V> Extend<(K, V)> for BTreeMap<K, V> {
|
impl<K: Ord, V> Extend<(K, V)> for BTreeMap<K, V> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn extend<T: Iterator<Item=(K, V)>>(&mut self, mut iter: T) {
|
fn extend<T: Iterator<Item=(K, V)>>(&mut self, iter: T) {
|
||||||
for (k, v) in iter {
|
for (k, v) in iter {
|
||||||
self.insert(k, v);
|
self.insert(k, v);
|
||||||
}
|
}
|
||||||
|
@ -499,7 +499,7 @@ impl<'a, T> IntoIterator for &'a BTreeSet<T> {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T: Ord> Extend<T> for BTreeSet<T> {
|
impl<T: Ord> Extend<T> for BTreeSet<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn extend<Iter: Iterator<Item=T>>(&mut self, mut iter: Iter) {
|
fn extend<Iter: Iterator<Item=T>>(&mut self, iter: Iter) {
|
||||||
for elem in iter {
|
for elem in iter {
|
||||||
self.insert(elem);
|
self.insert(elem);
|
||||||
}
|
}
|
||||||
|
@ -856,7 +856,7 @@ impl<'a, T> IntoIterator for &'a mut DList<T> {
|
|||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<A> Extend<A> for DList<A> {
|
impl<A> Extend<A> for DList<A> {
|
||||||
fn extend<T: Iterator<Item=A>>(&mut self, mut iterator: T) {
|
fn extend<T: Iterator<Item=A>>(&mut self, iterator: T) {
|
||||||
for elt in iterator { self.push_back(elt); }
|
for elt in iterator { self.push_back(elt); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ impl<'a, E> IntoIterator for &'a EnumSet<E> where E: CLike {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<E:CLike> Extend<E> for EnumSet<E> {
|
impl<E:CLike> Extend<E> for EnumSet<E> {
|
||||||
fn extend<I: Iterator<Item=E>>(&mut self, mut iterator: I) {
|
fn extend<I: Iterator<Item=E>>(&mut self, iterator: I) {
|
||||||
for element in iterator {
|
for element in iterator {
|
||||||
self.insert(element);
|
self.insert(element);
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
html_root_url = "http://doc.rust-lang.org/nightly/",
|
html_root_url = "http://doc.rust-lang.org/nightly/",
|
||||||
html_playground_url = "http://play.rust-lang.org/")]
|
html_playground_url = "http://play.rust-lang.org/")]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
|
|
||||||
|
|
||||||
#![feature(alloc)]
|
#![feature(alloc)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
|
@ -1635,7 +1635,7 @@ impl<'a, T> IntoIterator for &'a mut RingBuf<T> {
|
|||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<A> Extend<A> for RingBuf<A> {
|
impl<A> Extend<A> for RingBuf<A> {
|
||||||
fn extend<T: Iterator<Item=A>>(&mut self, mut iterator: T) {
|
fn extend<T: Iterator<Item=A>>(&mut self, iterator: T) {
|
||||||
for elt in iterator {
|
for elt in iterator {
|
||||||
self.push_back(elt);
|
self.push_back(elt);
|
||||||
}
|
}
|
||||||
|
@ -729,7 +729,7 @@ impl<'a> FromIterator<&'a str> for String {
|
|||||||
#[unstable(feature = "collections",
|
#[unstable(feature = "collections",
|
||||||
reason = "waiting on Extend stabilization")]
|
reason = "waiting on Extend stabilization")]
|
||||||
impl Extend<char> for String {
|
impl Extend<char> for String {
|
||||||
fn extend<I:Iterator<Item=char>>(&mut self, mut iterator: I) {
|
fn extend<I:Iterator<Item=char>>(&mut self, iterator: I) {
|
||||||
let (lower_bound, _) = iterator.size_hint();
|
let (lower_bound, _) = iterator.size_hint();
|
||||||
self.reserve(lower_bound);
|
self.reserve(lower_bound);
|
||||||
for ch in iterator {
|
for ch in iterator {
|
||||||
@ -741,7 +741,7 @@ impl Extend<char> for String {
|
|||||||
#[unstable(feature = "collections",
|
#[unstable(feature = "collections",
|
||||||
reason = "waiting on Extend stabilization")]
|
reason = "waiting on Extend stabilization")]
|
||||||
impl<'a> Extend<&'a str> for String {
|
impl<'a> Extend<&'a str> for String {
|
||||||
fn extend<I: Iterator<Item=&'a str>>(&mut self, mut iterator: I) {
|
fn extend<I: Iterator<Item=&'a str>>(&mut self, iterator: I) {
|
||||||
// A guess that at least one byte per iterator element will be needed.
|
// A guess that at least one byte per iterator element will be needed.
|
||||||
let (lower_bound, _) = iterator.size_hint();
|
let (lower_bound, _) = iterator.size_hint();
|
||||||
self.reserve(lower_bound);
|
self.reserve(lower_bound);
|
||||||
|
@ -1375,7 +1375,7 @@ impl<T> ops::DerefMut for Vec<T> {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<T> FromIterator<T> for Vec<T> {
|
impl<T> FromIterator<T> for Vec<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from_iter<I:Iterator<Item=T>>(mut iterator: I) -> Vec<T> {
|
fn from_iter<I:Iterator<Item=T>>(iterator: I) -> Vec<T> {
|
||||||
let (lower, _) = iterator.size_hint();
|
let (lower, _) = iterator.size_hint();
|
||||||
let mut vector = Vec::with_capacity(lower);
|
let mut vector = Vec::with_capacity(lower);
|
||||||
for element in iterator {
|
for element in iterator {
|
||||||
@ -1412,7 +1412,7 @@ impl<'a, T> IntoIterator for &'a mut Vec<T> {
|
|||||||
#[unstable(feature = "collections", reason = "waiting on Extend stability")]
|
#[unstable(feature = "collections", reason = "waiting on Extend stability")]
|
||||||
impl<T> Extend<T> for Vec<T> {
|
impl<T> Extend<T> for Vec<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn extend<I: Iterator<Item=T>>(&mut self, mut iterator: I) {
|
fn extend<I: Iterator<Item=T>>(&mut self, iterator: I) {
|
||||||
let (lower, _) = iterator.size_hint();
|
let (lower, _) = iterator.size_hint();
|
||||||
self.reserve(lower);
|
self.reserve(lower);
|
||||||
for element in iterator {
|
for element in iterator {
|
||||||
|
@ -562,7 +562,7 @@ impl<'a, T> IntoIterator for &'a mut VecMap<T> {
|
|||||||
|
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<V> Extend<(uint, V)> for VecMap<V> {
|
impl<V> Extend<(uint, V)> for VecMap<V> {
|
||||||
fn extend<Iter: Iterator<Item=(uint, V)>>(&mut self, mut iter: Iter) {
|
fn extend<Iter: Iterator<Item=(uint, V)>>(&mut self, iter: Iter) {
|
||||||
for (k, v) in iter {
|
for (k, v) in iter {
|
||||||
self.insert(k, v);
|
self.insert(k, v);
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,7 @@ pub trait IteratorExt: Iterator + Sized {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
fn last(mut self) -> Option<Self::Item> {
|
fn last(self) -> Option<Self::Item> {
|
||||||
let mut last = None;
|
let mut last = None;
|
||||||
for x in self { last = Some(x); }
|
for x in self { last = Some(x); }
|
||||||
last
|
last
|
||||||
@ -588,7 +588,7 @@ pub trait IteratorExt: Iterator + Sized {
|
|||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "core",
|
#[unstable(feature = "core",
|
||||||
reason = "recently added as part of collections reform")]
|
reason = "recently added as part of collections reform")]
|
||||||
fn partition<B, F>(mut self, mut f: F) -> (B, B) where
|
fn partition<B, F>(self, mut f: F) -> (B, B) where
|
||||||
B: Default + Extend<Self::Item>,
|
B: Default + Extend<Self::Item>,
|
||||||
F: FnMut(&Self::Item) -> bool
|
F: FnMut(&Self::Item) -> bool
|
||||||
{
|
{
|
||||||
@ -617,7 +617,7 @@ pub trait IteratorExt: Iterator + Sized {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
fn fold<B, F>(mut self, init: B, mut f: F) -> B where
|
fn fold<B, F>(self, init: B, mut f: F) -> B where
|
||||||
F: FnMut(B, Self::Item) -> B,
|
F: FnMut(B, Self::Item) -> B,
|
||||||
{
|
{
|
||||||
let mut accum = init;
|
let mut accum = init;
|
||||||
@ -638,7 +638,7 @@ pub trait IteratorExt: Iterator + Sized {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
fn all<F>(mut self, mut f: F) -> bool where F: FnMut(Self::Item) -> bool {
|
fn all<F>(self, mut f: F) -> bool where F: FnMut(Self::Item) -> bool {
|
||||||
for x in self { if !f(x) { return false; } }
|
for x in self { if !f(x) { return false; } }
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
@ -946,7 +946,7 @@ pub trait IteratorExt: Iterator + Sized {
|
|||||||
/// assert_eq!([2, 4], right);
|
/// assert_eq!([2, 4], right);
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "core", reason = "recent addition")]
|
#[unstable(feature = "core", reason = "recent addition")]
|
||||||
fn unzip<A, B, FromA, FromB>(mut self) -> (FromA, FromB) where
|
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where
|
||||||
FromA: Default + Extend<A>,
|
FromA: Default + Extend<A>,
|
||||||
FromB: Default + Extend<B>,
|
FromB: Default + Extend<B>,
|
||||||
Self: Iterator<Item=(A, B)>,
|
Self: Iterator<Item=(A, B)>,
|
||||||
|
@ -59,7 +59,6 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![allow(raw_pointer_derive)]
|
#![allow(raw_pointer_derive)]
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
|
|
||||||
|
|
||||||
#![feature(int_uint)]
|
#![feature(int_uint)]
|
||||||
#![feature(intrinsics, lang_items)]
|
#![feature(intrinsics, lang_items)]
|
||||||
|
@ -956,7 +956,7 @@ pub fn fold<T,
|
|||||||
E,
|
E,
|
||||||
F: FnMut(V, T) -> V,
|
F: FnMut(V, T) -> V,
|
||||||
Iter: Iterator<Item=Result<T, E>>>(
|
Iter: Iterator<Item=Result<T, E>>>(
|
||||||
mut iterator: Iter,
|
iterator: Iter,
|
||||||
mut init: V,
|
mut init: V,
|
||||||
mut f: F)
|
mut f: F)
|
||||||
-> Result<V, E> {
|
-> Result<V, E> {
|
||||||
|
@ -23,8 +23,6 @@
|
|||||||
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
||||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
|
|
||||||
|
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(collections)]
|
#![feature(collections)]
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
|
@ -610,7 +610,7 @@ impl<'a> Context<'a> {
|
|||||||
let mut rlibs = HashMap::new();
|
let mut rlibs = HashMap::new();
|
||||||
let mut dylibs = HashMap::new();
|
let mut dylibs = HashMap::new();
|
||||||
{
|
{
|
||||||
let mut locs = locs.iter().map(|l| Path::new(&l[])).filter(|loc| {
|
let locs = locs.iter().map(|l| Path::new(&l[])).filter(|loc| {
|
||||||
if !loc.exists() {
|
if !loc.exists() {
|
||||||
sess.err(&format!("extern location for {} does not exist: {}",
|
sess.err(&format!("extern location for {} does not exist: {}",
|
||||||
self.crate_name, loc.display())[]);
|
self.crate_name, loc.display())[]);
|
||||||
|
@ -317,7 +317,7 @@ impl<T> VecPerParamSpace<T> {
|
|||||||
///
|
///
|
||||||
/// Unlike the `extend` method in `Vec`, this should not be assumed
|
/// Unlike the `extend` method in `Vec`, this should not be assumed
|
||||||
/// to be a cheap operation (even when amortized over many calls).
|
/// to be a cheap operation (even when amortized over many calls).
|
||||||
pub fn extend<I:Iterator<Item=T>>(&mut self, space: ParamSpace, mut values: I) {
|
pub fn extend<I:Iterator<Item=T>>(&mut self, space: ParamSpace, values: I) {
|
||||||
// This could be made more efficient, obviously.
|
// This could be made more efficient, obviously.
|
||||||
for item in values {
|
for item in values {
|
||||||
self.push(space, item);
|
self.push(space, item);
|
||||||
|
@ -295,7 +295,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||||||
|
|
||||||
fn evaluate_predicates_recursively<'a,'o,I>(&mut self,
|
fn evaluate_predicates_recursively<'a,'o,I>(&mut self,
|
||||||
stack: Option<&TraitObligationStack<'o, 'tcx>>,
|
stack: Option<&TraitObligationStack<'o, 'tcx>>,
|
||||||
mut predicates: I)
|
predicates: I)
|
||||||
-> EvaluationResult<'tcx>
|
-> EvaluationResult<'tcx>
|
||||||
where I : Iterator<Item=&'a PredicateObligation<'tcx>>, 'tcx:'a
|
where I : Iterator<Item=&'a PredicateObligation<'tcx>>, 'tcx:'a
|
||||||
{
|
{
|
||||||
|
@ -265,7 +265,7 @@ pub fn sanitize(s: &str) -> String {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn mangle<PI: Iterator<Item=PathElem>>(mut path: PI,
|
pub fn mangle<PI: Iterator<Item=PathElem>>(path: PI,
|
||||||
hash: Option<&str>) -> String {
|
hash: Option<&str>) -> String {
|
||||||
// Follow C++ namespace-mangling style, see
|
// Follow C++ namespace-mangling style, see
|
||||||
// http://en.wikipedia.org/wiki/Name_mangling for more info.
|
// http://en.wikipedia.org/wiki/Name_mangling for more info.
|
||||||
@ -1055,10 +1055,10 @@ fn add_local_native_libraries(cmd: &mut Command, sess: &Session) {
|
|||||||
let libs = sess.cstore.get_used_libraries();
|
let libs = sess.cstore.get_used_libraries();
|
||||||
let libs = libs.borrow();
|
let libs = libs.borrow();
|
||||||
|
|
||||||
let mut staticlibs = libs.iter().filter_map(|&(ref l, kind)| {
|
let staticlibs = libs.iter().filter_map(|&(ref l, kind)| {
|
||||||
if kind == cstore::NativeStatic {Some(l)} else {None}
|
if kind == cstore::NativeStatic {Some(l)} else {None}
|
||||||
});
|
});
|
||||||
let mut others = libs.iter().filter(|&&(_, kind)| {
|
let others = libs.iter().filter(|&&(_, kind)| {
|
||||||
kind != cstore::NativeStatic
|
kind != cstore::NativeStatic
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -23,8 +23,6 @@
|
|||||||
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
||||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
|
|
||||||
|
|
||||||
#![feature(alloc)]
|
#![feature(alloc)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(collections)]
|
#![feature(collections)]
|
||||||
|
@ -3848,7 +3848,7 @@ fn push_debuginfo_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
|
|||||||
def_id: ast::DefId,
|
def_id: ast::DefId,
|
||||||
qualified: bool,
|
qualified: bool,
|
||||||
output: &mut String) {
|
output: &mut String) {
|
||||||
ty::with_path(cx.tcx(), def_id, |mut path| {
|
ty::with_path(cx.tcx(), def_id, |path| {
|
||||||
if qualified {
|
if qualified {
|
||||||
if def_id.krate == ast::LOCAL_CRATE {
|
if def_id.krate == ast::LOCAL_CRATE {
|
||||||
output.push_str(crate_root_namespace(cx));
|
output.push_str(crate_root_namespace(cx));
|
||||||
|
@ -353,7 +353,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
|
|||||||
assert!(ty_substs_a.len() == ty_substs_b.len());
|
assert!(ty_substs_a.len() == ty_substs_b.len());
|
||||||
|
|
||||||
let mut result = None;
|
let mut result = None;
|
||||||
let mut tps = ty_substs_a.iter().zip(ty_substs_b.iter()).enumerate();
|
let tps = ty_substs_a.iter().zip(ty_substs_b.iter()).enumerate();
|
||||||
for (i, (tp_a, tp_b)) in tps {
|
for (i, (tp_a, tp_b)) in tps {
|
||||||
if self.fcx.infcx().try(|_| self.subtype(*tp_a, *tp_b)).is_ok() {
|
if self.fcx.infcx().try(|_| self.subtype(*tp_a, *tp_b)).is_ok() {
|
||||||
continue;
|
continue;
|
||||||
|
@ -805,7 +805,7 @@ fn check_trait_on_unimplemented<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
|
|||||||
a.check_name("rustc_on_unimplemented")
|
a.check_name("rustc_on_unimplemented")
|
||||||
}) {
|
}) {
|
||||||
if let Some(ref istring) = attr.value_str() {
|
if let Some(ref istring) = attr.value_str() {
|
||||||
let mut parser = Parser::new(istring.get());
|
let parser = Parser::new(istring.get());
|
||||||
let types = generics.ty_params.as_slice();
|
let types = generics.ty_params.as_slice();
|
||||||
for token in parser {
|
for token in parser {
|
||||||
match token {
|
match token {
|
||||||
|
@ -854,7 +854,7 @@ fn constrain_callee(rcx: &mut Rcx,
|
|||||||
fn constrain_call<'a, I: Iterator<Item=&'a ast::Expr>>(rcx: &mut Rcx,
|
fn constrain_call<'a, I: Iterator<Item=&'a ast::Expr>>(rcx: &mut Rcx,
|
||||||
call_expr: &ast::Expr,
|
call_expr: &ast::Expr,
|
||||||
receiver: Option<&ast::Expr>,
|
receiver: Option<&ast::Expr>,
|
||||||
mut arg_exprs: I,
|
arg_exprs: I,
|
||||||
implicitly_ref_args: bool) {
|
implicitly_ref_args: bool) {
|
||||||
//! Invoked on every call site (i.e., normal calls, method calls,
|
//! Invoked on every call site (i.e., normal calls, method calls,
|
||||||
//! and overloaded operators). Constrains the regions which appear
|
//! and overloaded operators). Constrains the regions which appear
|
||||||
|
@ -439,7 +439,7 @@ fn convert_associated_type<'a, 'tcx>(ccx: &CollectCtxt<'a, 'tcx>,
|
|||||||
|
|
||||||
fn convert_methods<'a,'tcx,'i,I>(ccx: &CollectCtxt<'a, 'tcx>,
|
fn convert_methods<'a,'tcx,'i,I>(ccx: &CollectCtxt<'a, 'tcx>,
|
||||||
container: ImplOrTraitItemContainer,
|
container: ImplOrTraitItemContainer,
|
||||||
mut ms: I,
|
ms: I,
|
||||||
untransformed_rcvr_ty: Ty<'tcx>,
|
untransformed_rcvr_ty: Ty<'tcx>,
|
||||||
rcvr_ty_generics: &ty::Generics<'tcx>,
|
rcvr_ty_generics: &ty::Generics<'tcx>,
|
||||||
rcvr_visibility: ast::Visibility)
|
rcvr_visibility: ast::Visibility)
|
||||||
@ -1655,7 +1655,7 @@ fn enforce_impl_ty_params_are_constrained<'tcx>(tcx: &ty::ctxt<'tcx>,
|
|||||||
loop {
|
loop {
|
||||||
let num_inputs = input_parameters.len();
|
let num_inputs = input_parameters.len();
|
||||||
|
|
||||||
let mut projection_predicates =
|
let projection_predicates =
|
||||||
impl_scheme.generics.predicates
|
impl_scheme.generics.predicates
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|predicate| {
|
.filter_map(|predicate| {
|
||||||
|
@ -73,7 +73,6 @@ This API is completely unstable and subject to change.
|
|||||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||||
|
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
|
|
||||||
|
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(collections)]
|
#![feature(collections)]
|
||||||
|
@ -1416,7 +1416,7 @@ impl<K, V, S, H> IntoIterator for HashMap<K, V, S>
|
|||||||
{
|
{
|
||||||
type Iter = IntoIter<K, V>;
|
type Iter = IntoIter<K, V>;
|
||||||
|
|
||||||
fn into_iter(mut self) -> IntoIter<K, V> {
|
fn into_iter(self) -> IntoIter<K, V> {
|
||||||
self.into_iter()
|
self.into_iter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1575,7 +1575,7 @@ impl<K, V, S, H> Extend<(K, V)> for HashMap<K, V, S>
|
|||||||
S: HashState<Hasher=H>,
|
S: HashState<Hasher=H>,
|
||||||
H: hash::Hasher<Output=u64>
|
H: hash::Hasher<Output=u64>
|
||||||
{
|
{
|
||||||
fn extend<T: Iterator<Item=(K, V)>>(&mut self, mut iter: T) {
|
fn extend<T: Iterator<Item=(K, V)>>(&mut self, iter: T) {
|
||||||
for (k, v) in iter {
|
for (k, v) in iter {
|
||||||
self.insert(k, v);
|
self.insert(k, v);
|
||||||
}
|
}
|
||||||
|
@ -636,7 +636,7 @@ impl<T, S, H> Extend<T> for HashSet<T, S>
|
|||||||
S: HashState<Hasher=H>,
|
S: HashState<Hasher=H>,
|
||||||
H: hash::Hasher<Output=u64>
|
H: hash::Hasher<Output=u64>
|
||||||
{
|
{
|
||||||
fn extend<I: Iterator<Item=T>>(&mut self, mut iter: I) {
|
fn extend<I: Iterator<Item=T>>(&mut self, iter: I) {
|
||||||
for k in iter {
|
for k in iter {
|
||||||
self.insert(k);
|
self.insert(k);
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,6 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
@ -597,7 +597,7 @@ pub fn mkdir_recursive(path: &Path, mode: FilePermission) -> IoResult<()> {
|
|||||||
return Ok(())
|
return Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut comps = path.components();
|
let comps = path.components();
|
||||||
let mut curpath = path.root_path().unwrap_or(Path::new("."));
|
let mut curpath = path.root_path().unwrap_or(Path::new("."));
|
||||||
|
|
||||||
for c in comps {
|
for c in comps {
|
||||||
|
@ -366,7 +366,7 @@ impl FromIterator<CodePoint> for Wtf8Buf {
|
|||||||
/// This replaces surrogate code point pairs with supplementary code points,
|
/// This replaces surrogate code point pairs with supplementary code points,
|
||||||
/// like concatenating ill-formed UTF-16 strings effectively would.
|
/// like concatenating ill-formed UTF-16 strings effectively would.
|
||||||
impl Extend<CodePoint> for Wtf8Buf {
|
impl Extend<CodePoint> for Wtf8Buf {
|
||||||
fn extend<T: Iterator<Item=CodePoint>>(&mut self, mut iterator: T) {
|
fn extend<T: Iterator<Item=CodePoint>>(&mut self, iterator: T) {
|
||||||
let (low, _high) = iterator.size_hint();
|
let (low, _high) = iterator.size_hint();
|
||||||
// Lower bound of one byte per code point (ASCII only)
|
// Lower bound of one byte per code point (ASCII only)
|
||||||
self.bytes.reserve(low);
|
self.bytes.reserve(low);
|
||||||
|
@ -373,7 +373,7 @@ impl fmt::Display for StabilityLevel {
|
|||||||
fn find_stability_generic<'a,
|
fn find_stability_generic<'a,
|
||||||
AM: AttrMetaMethods,
|
AM: AttrMetaMethods,
|
||||||
I: Iterator<Item=&'a AM>>
|
I: Iterator<Item=&'a AM>>
|
||||||
(diagnostic: &SpanHandler, mut attrs: I, item_sp: Span)
|
(diagnostic: &SpanHandler, attrs: I, item_sp: Span)
|
||||||
-> (Option<Stability>, Vec<&'a AM>) {
|
-> (Option<Stability>, Vec<&'a AM>) {
|
||||||
|
|
||||||
let mut stab: Option<Stability> = None;
|
let mut stab: Option<Stability> = None;
|
||||||
|
@ -23,8 +23,6 @@
|
|||||||
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
||||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
|
|
||||||
|
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(collections)]
|
#![feature(collections)]
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
|
@ -38,7 +38,7 @@ impl<T> FromIterator<T> for SmallVector<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<T> Extend<T> for SmallVector<T> {
|
impl<T> Extend<T> for SmallVector<T> {
|
||||||
fn extend<I: Iterator<Item=T>>(&mut self, mut iter: I) {
|
fn extend<I: Iterator<Item=T>>(&mut self, iter: I) {
|
||||||
for val in iter {
|
for val in iter {
|
||||||
self.push(val);
|
self.push(val);
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,6 @@
|
|||||||
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
||||||
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
html_root_url = "http://doc.rust-lang.org/nightly/")]
|
||||||
|
|
||||||
#![cfg_attr(not(stage0), allow(unused_mut))] // NOTE: remove after stage0 snap
|
|
||||||
|
|
||||||
#![feature(asm, slicing_syntax)]
|
#![feature(asm, slicing_syntax)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(collections)]
|
#![feature(collections)]
|
||||||
|
@ -332,7 +332,7 @@ pub fn winsorize<T: Float + FromPrimitive>(samples: &mut [T], pct: T) {
|
|||||||
|
|
||||||
/// Returns a HashMap with the number of occurrences of every element in the
|
/// Returns a HashMap with the number of occurrences of every element in the
|
||||||
/// sequence that the iterator exposes.
|
/// sequence that the iterator exposes.
|
||||||
pub fn freq_count<T, U>(mut iter: T) -> hash_map::HashMap<U, uint>
|
pub fn freq_count<T, U>(iter: T) -> hash_map::HashMap<U, uint>
|
||||||
where T: Iterator<Item=U>, U: Eq + Clone + Hash<Hasher>
|
where T: Iterator<Item=U>, U: Eq + Clone + Hash<Hasher>
|
||||||
{
|
{
|
||||||
let mut map: hash_map::HashMap<U,uint> = hash_map::HashMap::new();
|
let mut map: hash_map::HashMap<U,uint> = hash_map::HashMap::new();
|
||||||
|
Loading…
Reference in New Issue
Block a user