diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 2b1072673688b..94cc933d844f3 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -171,8 +171,7 @@ pub trait IteratorExt: Iterator + Sized { self.fold(0, |cnt, _x| cnt + 1) } - /// Loops through the entire iterator, returning the last element of the - /// iterator. + /// Loops through the entire iterator, returning the last element. /// /// # Examples /// diff --git a/src/test/auxiliary/static-methods-crate.rs b/src/test/auxiliary/static-methods-crate.rs index d84ded25702f4..e61fb49add5b1 100644 --- a/src/test/auxiliary/static-methods-crate.rs +++ b/src/test/auxiliary/static-methods-crate.rs @@ -11,14 +11,12 @@ #![crate_name="static_methods_crate"] #![crate_type = "lib"] -use std::int; - pub trait read { fn readMaybe(s: String) -> Option; } -impl read for int { - fn readMaybe(s: String) -> Option { +impl read for isize { + fn readMaybe(s: String) -> Option { s.parse().ok() } } diff --git a/src/test/run-pass/deriving-primitive.rs b/src/test/run-pass/deriving-primitive.rs index eb3cb30594ea8..6b365c348f782 100644 --- a/src/test/run-pass/deriving-primitive.rs +++ b/src/test/run-pass/deriving-primitive.rs @@ -9,18 +9,18 @@ // except according to those terms. use std::num::FromPrimitive; -use std::int; +use std::isize; #[derive(PartialEq, FromPrimitive, Debug)] enum A { - Foo = int::MAX, + Foo = isize::MAX, Bar = 1, Baz = 3, Qux, } pub fn main() { - let x: Option = FromPrimitive::from_int(int::MAX); + let x: Option = FromPrimitive::from_int(isize::MAX); assert_eq!(x, Some(A::Foo)); let x: Option = FromPrimitive::from_int(1); diff --git a/src/test/run-pass/match-with-ret-arm.rs b/src/test/run-pass/match-with-ret-arm.rs index 05c6aac90e39c..d2e27fc822eeb 100644 --- a/src/test/run-pass/match-with-ret-arm.rs +++ b/src/test/run-pass/match-with-ret-arm.rs @@ -8,13 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::uint; - pub fn main() { // sometimes we have had trouble finding // the right type for f, as we unified // bot and u32 here - let f = match "1234".parse::().ok() { + let f = match "1234".parse::().ok() { None => return (), Some(num) => num as u32 };