Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/libcore/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down
6 changes: 2 additions & 4 deletions src/test/auxiliary/static-methods-crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@
#![crate_name="static_methods_crate"]
#![crate_type = "lib"]

use std::int;

pub trait read {
fn readMaybe(s: String) -> Option<Self>;
}

impl read for int {
fn readMaybe(s: String) -> Option<int> {
impl read for isize {
fn readMaybe(s: String) -> Option<isize> {
s.parse().ok()
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/run-pass/deriving-primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<A> = FromPrimitive::from_int(int::MAX);
let x: Option<A> = FromPrimitive::from_int(isize::MAX);
assert_eq!(x, Some(A::Foo));

let x: Option<A> = FromPrimitive::from_int(1);
Expand Down
4 changes: 1 addition & 3 deletions src/test/run-pass/match-with-ret-arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<uint>().ok() {
let f = match "1234".parse::<usize>().ok() {
None => return (),
Some(num) => num as u32
};
Expand Down