about summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-25 17:06:52 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-26 12:10:22 -0700
commit43bfaa4a336095eb5697fb2df50909fd3c72ed14 (patch)
treee10610e1ce9811c89e1291b786d7a49b63ee02d9 /src/libcoretest
parent54f16b818b58f6d6e81891b041fc751986e75155 (diff)
downloadrust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.tar.gz
rust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.zip
Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
Diffstat (limited to 'src/libcoretest')
-rw-r--r--src/libcoretest/any.rs24
-rw-r--r--src/libcoretest/cell.rs8
-rw-r--r--src/libcoretest/cmp.rs2
-rw-r--r--src/libcoretest/iter.rs76
-rw-r--r--src/libcoretest/mem.rs26
-rw-r--r--src/libcoretest/nonzero.rs2
-rw-r--r--src/libcoretest/ops.rs2
-rw-r--r--src/libcoretest/option.rs48
-rw-r--r--src/libcoretest/ptr.rs28
-rw-r--r--src/libcoretest/result.rs58
10 files changed, 137 insertions, 137 deletions
diff --git a/src/libcoretest/any.rs b/src/libcoretest/any.rs
index 39f5d237a2b..eeaaa3e217e 100644
--- a/src/libcoretest/any.rs
+++ b/src/libcoretest/any.rs
@@ -37,9 +37,9 @@ fn any_referenced() {
 fn any_owning() {
     let (a, b, c) = (box 5_usize as Box<Any>, box TEST as Box<Any>, box Test as Box<Any>);
 
-    assert!(a.is::<uint>());
-    assert!(!b.is::<uint>());
-    assert!(!c.is::<uint>());
+    assert!(a.is::<usize>());
+    assert!(!b.is::<usize>());
+    assert!(!c.is::<usize>());
 
     assert!(!a.is::<&'static str>());
     assert!(b.is::<&'static str>());
@@ -54,7 +54,7 @@ fn any_owning() {
 fn any_downcast_ref() {
     let a = &5_usize as &Any;
 
-    match a.downcast_ref::<uint>() {
+    match a.downcast_ref::<usize>() {
         Some(&5) => {}
         x => panic!("Unexpected value {:?}", x)
     }
@@ -71,10 +71,10 @@ fn any_downcast_mut() {
     let mut b: Box<_> = box 7_usize;
 
     let a_r = &mut a as &mut Any;
-    let tmp: &mut uint = &mut *b;
+    let tmp: &mut usize = &mut *b;
     let b_r = tmp as &mut Any;
 
-    match a_r.downcast_mut::<uint>() {
+    match a_r.downcast_mut::<usize>() {
         Some(x) => {
             assert_eq!(*x, 5);
             *x = 612;
@@ -82,7 +82,7 @@ fn any_downcast_mut() {
         x => panic!("Unexpected value {:?}", x)
     }
 
-    match b_r.downcast_mut::<uint>() {
+    match b_r.downcast_mut::<usize>() {
         Some(x) => {
             assert_eq!(*x, 7);
             *x = 413;
@@ -100,12 +100,12 @@ fn any_downcast_mut() {
         x => panic!("Unexpected value {:?}", x)
     }
 
-    match a_r.downcast_mut::<uint>() {
+    match a_r.downcast_mut::<usize>() {
         Some(&mut 612) => {}
         x => panic!("Unexpected value {:?}", x)
     }
 
-    match b_r.downcast_mut::<uint>() {
+    match b_r.downcast_mut::<usize>() {
         Some(&mut 413) => {}
         x => panic!("Unexpected value {:?}", x)
     }
@@ -115,8 +115,8 @@ fn any_downcast_mut() {
 fn any_fixed_vec() {
     let test = [0_usize; 8];
     let test = &test as &Any;
-    assert!(test.is::<[uint; 8]>());
-    assert!(!test.is::<[uint; 10]>());
+    assert!(test.is::<[usize; 8]>());
+    assert!(!test.is::<[usize; 10]>());
 }
 
 
@@ -126,6 +126,6 @@ fn bench_downcast_ref(b: &mut Bencher) {
         let mut x = 0;
         let mut y = &mut x as &mut Any;
         test::black_box(&mut y);
-        test::black_box(y.downcast_ref::<int>() == Some(&0));
+        test::black_box(y.downcast_ref::<isize>() == Some(&0));
     });
 }
diff --git a/src/libcoretest/cell.rs b/src/libcoretest/cell.rs
index 3397cbb18fa..fff3cc14ead 100644
--- a/src/libcoretest/cell.rs
+++ b/src/libcoretest/cell.rs
@@ -134,19 +134,19 @@ fn clone_ref_updates_flag() {
 
 #[test]
 fn as_unsafe_cell() {
-    let c1: Cell<uint> = Cell::new(0);
+    let c1: Cell<usize> = Cell::new(0);
     c1.set(1);
     assert_eq!(1, unsafe { *c1.as_unsafe_cell().get() });
 
-    let c2: Cell<uint> = Cell::new(0);
+    let c2: Cell<usize> = Cell::new(0);
     unsafe { *c2.as_unsafe_cell().get() = 1; }
     assert_eq!(1, c2.get());
 
-    let r1: RefCell<uint> = RefCell::new(0);
+    let r1: RefCell<usize> = RefCell::new(0);
     *r1.borrow_mut() = 1;
     assert_eq!(1, unsafe { *r1.as_unsafe_cell().get() });
 
-    let r2: RefCell<uint> = RefCell::new(0);
+    let r2: RefCell<usize> = RefCell::new(0);
     unsafe { *r2.as_unsafe_cell().get() = 1; }
     assert_eq!(1, *r2.borrow());
 }
diff --git a/src/libcoretest/cmp.rs b/src/libcoretest/cmp.rs
index 2e5c6fe5a2f..9ed1508c3eb 100644
--- a/src/libcoretest/cmp.rs
+++ b/src/libcoretest/cmp.rs
@@ -114,7 +114,7 @@ fn test_user_defined_eq() {
 
     // Our type.
     struct SketchyNum {
-        num : int
+        num : isize
     }
 
     // Our implementation of `PartialEq` to support `==` and `!=`.
diff --git a/src/libcoretest/iter.rs b/src/libcoretest/iter.rs
index 52cc2519add..15938a5dcb4 100644
--- a/src/libcoretest/iter.rs
+++ b/src/libcoretest/iter.rs
@@ -19,7 +19,7 @@ use test::Bencher;
 
 #[test]
 fn test_lt() {
-    let empty: [int; 0] = [];
+    let empty: [isize; 0] = [];
     let xs = [1,2,3];
     let ys = [1,2,0];
 
@@ -73,7 +73,7 @@ fn test_multi_iter() {
 #[test]
 fn test_counter_from_iter() {
     let it = count(0, 5).take(10);
-    let xs: Vec<int> = FromIterator::from_iter(it);
+    let xs: Vec<isize> = FromIterator::from_iter(it);
     assert_eq!(xs, [0, 5, 10, 15, 20, 25, 30, 35, 40, 45]);
 }
 
@@ -104,7 +104,7 @@ fn test_iterator_chain() {
 fn test_filter_map() {
     let it = count(0, 1).take(10)
         .filter_map(|x| if x % 2 == 0 { Some(x*x) } else { None });
-    assert_eq!(it.collect::<Vec<uint>>(), [0*0, 2*2, 4*4, 6*6, 8*8]);
+    assert_eq!(it.collect::<Vec<usize>>(), [0*0, 2*2, 4*4, 6*6, 8*8]);
 }
 
 #[test]
@@ -224,8 +224,8 @@ fn test_iterator_take_short() {
 #[test]
 fn test_iterator_scan() {
     // test the type inference
-    fn add(old: &mut int, new: &uint) -> Option<f64> {
-        *old += *new as int;
+    fn add(old: &mut isize, new: &usize) -> Option<f64> {
+        *old += *new as isize;
         Some(*old as f64)
     }
     let xs = [0, 1, 2, 3, 4];
@@ -261,7 +261,7 @@ fn test_inspect() {
     let ys = xs.iter()
                .cloned()
                .inspect(|_| n += 1)
-               .collect::<Vec<uint>>();
+               .collect::<Vec<usize>>();
 
     assert_eq!(n, xs.len());
     assert_eq!(&xs[..], &ys[..]);
@@ -269,7 +269,7 @@ fn test_inspect() {
 
 #[test]
 fn test_unfoldr() {
-    fn count(st: &mut uint) -> Option<uint> {
+    fn count(st: &mut usize) -> Option<usize> {
         if *st < 10 {
             let ret = Some(*st);
             *st += 1;
@@ -398,14 +398,14 @@ fn test_iterator_size_hint() {
 #[test]
 fn test_collect() {
     let a = vec![1, 2, 3, 4, 5];
-    let b: Vec<int> = a.iter().cloned().collect();
+    let b: Vec<isize> = a.iter().cloned().collect();
     assert!(a == b);
 }
 
 #[test]
 fn test_all() {
     // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
-    let v: Box<[int]> = Box::new([1, 2, 3, 4, 5]);
+    let v: Box<[isize]> = Box::new([1, 2, 3, 4, 5]);
     assert!(v.iter().all(|&x| x < 10));
     assert!(!v.iter().all(|&x| x % 2 == 0));
     assert!(!v.iter().all(|&x| x > 100));
@@ -415,7 +415,7 @@ fn test_all() {
 #[test]
 fn test_any() {
     // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
-    let v: Box<[int]> = Box::new([1, 2, 3, 4, 5]);
+    let v: Box<[isize]> = Box::new([1, 2, 3, 4, 5]);
     assert!(v.iter().any(|&x| x < 10));
     assert!(v.iter().any(|&x| x % 2 == 0));
     assert!(!v.iter().any(|&x| x > 100));
@@ -424,7 +424,7 @@ fn test_any() {
 
 #[test]
 fn test_find() {
-    let v: &[int] = &[1, 3, 9, 27, 103, 14, 11];
+    let v: &[isize] = &[1, 3, 9, 27, 103, 14, 11];
     assert_eq!(*v.iter().find(|&&x| x & 1 == 0).unwrap(), 14);
     assert_eq!(*v.iter().find(|&&x| x % 3 == 0).unwrap(), 3);
     assert!(v.iter().find(|&&x| x % 12 == 0).is_none());
@@ -448,13 +448,13 @@ fn test_count() {
 
 #[test]
 fn test_max_by() {
-    let xs: &[int] = &[-3, 0, 1, 5, -10];
+    let xs: &[isize] = &[-3, 0, 1, 5, -10];
     assert_eq!(*xs.iter().max_by(|x| x.abs()).unwrap(), -10);
 }
 
 #[test]
 fn test_min_by() {
-    let xs: &[int] = &[-3, 0, 1, 5, -10];
+    let xs: &[isize] = &[-3, 0, 1, 5, -10];
     assert_eq!(*xs.iter().min_by(|x| x.abs()).unwrap(), 0);
 }
 
@@ -473,7 +473,7 @@ fn test_rev() {
     let mut it = xs.iter();
     it.next();
     it.next();
-    assert!(it.rev().cloned().collect::<Vec<int>>() ==
+    assert!(it.rev().cloned().collect::<Vec<isize>>() ==
             vec![16, 14, 12, 10, 8, 6]);
 }
 
@@ -572,8 +572,8 @@ fn test_double_ended_chain() {
 
 #[test]
 fn test_rposition() {
-    fn f(xy: &(int, char)) -> bool { let (_x, y) = *xy; y == 'b' }
-    fn g(xy: &(int, char)) -> bool { let (_x, y) = *xy; y == 'd' }
+    fn f(xy: &(isize, char)) -> bool { let (_x, y) = *xy; y == 'b' }
+    fn g(xy: &(isize, char)) -> bool { let (_x, y) = *xy; y == 'd' }
     let v = [(0, 'a'), (1, 'b'), (2, 'c'), (3, 'b')];
 
     assert_eq!(v.iter().rposition(f), Some(3));
@@ -598,7 +598,7 @@ fn test_rposition_panic() {
 
 
 #[cfg(test)]
-fn check_randacc_iter<A, T>(a: T, len: uint) where
+fn check_randacc_iter<A, T>(a: T, len: usize) where
     A: PartialEq,
     T: Clone + RandomAccessIterator + Iterator<Item=A>,
 {
@@ -684,7 +684,7 @@ fn test_random_access_zip() {
 #[test]
 fn test_random_access_take() {
     let xs = [1, 2, 3, 4, 5];
-    let empty: &[int] = &[];
+    let empty: &[isize] = &[];
     check_randacc_iter(xs.iter().take(3), 3);
     check_randacc_iter(xs.iter().take(20), xs.len());
     check_randacc_iter(xs.iter().take(0), 0);
@@ -694,7 +694,7 @@ fn test_random_access_take() {
 #[test]
 fn test_random_access_skip() {
     let xs = [1, 2, 3, 4, 5];
-    let empty: &[int] = &[];
+    let empty: &[isize] = &[];
     check_randacc_iter(xs.iter().skip(2), xs.len() - 2);
     check_randacc_iter(empty.iter().skip(2), 0);
 }
@@ -726,7 +726,7 @@ fn test_random_access_map() {
 #[test]
 fn test_random_access_cycle() {
     let xs = [1, 2, 3, 4, 5];
-    let empty: &[int] = &[];
+    let empty: &[isize] = &[];
     check_randacc_iter(xs.iter().cycle().take(27), 27);
     check_randacc_iter(empty.iter().cycle(), 0);
 }
@@ -755,7 +755,7 @@ fn test_range() {
     assert_eq!((200..200).rev().count(), 0);
 
     assert_eq!((0..100).size_hint(), (100, Some(100)));
-    // this test is only meaningful when sizeof uint < sizeof u64
+    // this test is only meaningful when sizeof usize < sizeof u64
     assert_eq!((usize::MAX - 1..usize::MAX).size_hint(), (1, Some(1)));
     assert_eq!((-10..-1).size_hint(), (9, Some(9)));
     assert_eq!((-1..-10).size_hint(), (0, Some(0)));
@@ -763,34 +763,34 @@ fn test_range() {
 
 #[test]
 fn test_range_inclusive() {
-    assert!(range_inclusive(0, 5).collect::<Vec<int>>() ==
+    assert!(range_inclusive(0, 5).collect::<Vec<isize>>() ==
             vec![0, 1, 2, 3, 4, 5]);
-    assert!(range_inclusive(0, 5).rev().collect::<Vec<int>>() ==
+    assert!(range_inclusive(0, 5).rev().collect::<Vec<isize>>() ==
             vec![5, 4, 3, 2, 1, 0]);
     assert_eq!(range_inclusive(200, -5).count(), 0);
     assert_eq!(range_inclusive(200, -5).rev().count(), 0);
-    assert_eq!(range_inclusive(200, 200).collect::<Vec<int>>(), [200]);
-    assert_eq!(range_inclusive(200, 200).rev().collect::<Vec<int>>(), [200]);
+    assert_eq!(range_inclusive(200, 200).collect::<Vec<isize>>(), [200]);
+    assert_eq!(range_inclusive(200, 200).rev().collect::<Vec<isize>>(), [200]);
 }
 
 #[test]
 fn test_range_step() {
-    assert_eq!((0..20).step_by(5).collect::<Vec<int>>(), [0, 5, 10, 15]);
-    assert_eq!((20..0).step_by(-5).collect::<Vec<int>>(), [20, 15, 10, 5]);
-    assert_eq!((20..0).step_by(-6).collect::<Vec<int>>(), [20, 14, 8, 2]);
+    assert_eq!((0..20).step_by(5).collect::<Vec<isize>>(), [0, 5, 10, 15]);
+    assert_eq!((20..0).step_by(-5).collect::<Vec<isize>>(), [20, 15, 10, 5]);
+    assert_eq!((20..0).step_by(-6).collect::<Vec<isize>>(), [20, 14, 8, 2]);
     assert_eq!((200..255).step_by(50).collect::<Vec<u8>>(), [200, 250]);
-    assert_eq!((200..-5).step_by(1).collect::<Vec<int>>(), []);
-    assert_eq!((200..200).step_by(1).collect::<Vec<int>>(), []);
+    assert_eq!((200..-5).step_by(1).collect::<Vec<isize>>(), []);
+    assert_eq!((200..200).step_by(1).collect::<Vec<isize>>(), []);
 }
 
 #[test]
 fn test_range_step_inclusive() {
-    assert_eq!(range_step_inclusive(0, 20, 5).collect::<Vec<int>>(), [0, 5, 10, 15, 20]);
-    assert_eq!(range_step_inclusive(20, 0, -5).collect::<Vec<int>>(), [20, 15, 10, 5, 0]);
-    assert_eq!(range_step_inclusive(20, 0, -6).collect::<Vec<int>>(), [20, 14, 8, 2]);
+    assert_eq!(range_step_inclusive(0, 20, 5).collect::<Vec<isize>>(), [0, 5, 10, 15, 20]);
+    assert_eq!(range_step_inclusive(20, 0, -5).collect::<Vec<isize>>(), [20, 15, 10, 5, 0]);
+    assert_eq!(range_step_inclusive(20, 0, -6).collect::<Vec<isize>>(), [20, 14, 8, 2]);
     assert_eq!(range_step_inclusive(200, 255, 50).collect::<Vec<u8>>(), [200, 250]);
-    assert_eq!(range_step_inclusive(200, -5, 1).collect::<Vec<int>>(), []);
-    assert_eq!(range_step_inclusive(200, 200, 1).collect::<Vec<int>>(), [200]);
+    assert_eq!(range_step_inclusive(200, -5, 1).collect::<Vec<isize>>(), []);
+    assert_eq!(range_step_inclusive(200, 200, 1).collect::<Vec<isize>>(), [200]);
 }
 
 #[test]
@@ -811,7 +811,7 @@ fn test_peekable_is_empty() {
 
 #[test]
 fn test_min_max() {
-    let v: [int; 0] = [];
+    let v: [isize; 0] = [];
     assert_eq!(v.iter().min_max(), NoElements);
 
     let v = [1];
@@ -829,7 +829,7 @@ fn test_min_max() {
 
 #[test]
 fn test_min_max_result() {
-    let r: MinMaxResult<int> = NoElements;
+    let r: MinMaxResult<isize> = NoElements;
     assert_eq!(r.into_option(), None);
 
     let r = OneElement(1);
@@ -876,7 +876,7 @@ fn test_fuse() {
 
 #[bench]
 fn bench_rposition(b: &mut Bencher) {
-    let it: Vec<uint> = (0..300).collect();
+    let it: Vec<usize> = (0..300).collect();
     b.iter(|| {
         it.iter().rposition(|&x| x <= 150);
     });
diff --git a/src/libcoretest/mem.rs b/src/libcoretest/mem.rs
index 17d6b684c50..fae36787c3d 100644
--- a/src/libcoretest/mem.rs
+++ b/src/libcoretest/mem.rs
@@ -21,15 +21,15 @@ fn size_of_basic() {
 #[test]
 #[cfg(target_pointer_width = "32")]
 fn size_of_32() {
-    assert_eq!(size_of::<uint>(), 4);
-    assert_eq!(size_of::<*const uint>(), 4);
+    assert_eq!(size_of::<usize>(), 4);
+    assert_eq!(size_of::<*const usize>(), 4);
 }
 
 #[test]
 #[cfg(target_pointer_width = "64")]
 fn size_of_64() {
-    assert_eq!(size_of::<uint>(), 8);
-    assert_eq!(size_of::<*const uint>(), 8);
+    assert_eq!(size_of::<usize>(), 8);
+    assert_eq!(size_of::<*const usize>(), 8);
 }
 
 #[test]
@@ -50,15 +50,15 @@ fn align_of_basic() {
 #[test]
 #[cfg(target_pointer_width = "32")]
 fn align_of_32() {
-    assert_eq!(align_of::<uint>(), 4);
-    assert_eq!(align_of::<*const uint>(), 4);
+    assert_eq!(align_of::<usize>(), 4);
+    assert_eq!(align_of::<*const usize>(), 4);
 }
 
 #[test]
 #[cfg(target_pointer_width = "64")]
 fn align_of_64() {
-    assert_eq!(align_of::<uint>(), 8);
-    assert_eq!(align_of::<*const uint>(), 8);
+    assert_eq!(align_of::<usize>(), 8);
+    assert_eq!(align_of::<*const usize>(), 8);
 }
 
 #[test]
@@ -93,12 +93,12 @@ fn test_transmute_copy() {
 #[test]
 fn test_transmute() {
     trait Foo { fn dummy(&self) { } }
-    impl Foo for int {}
+    impl Foo for isize {}
 
     let a = box 100isize as Box<Foo>;
     unsafe {
         let x: ::core::raw::TraitObject = transmute(a);
-        assert!(*(x.data as *const int) == 100);
+        assert!(*(x.data as *const isize) == 100);
         let _x: Box<Foo> = transmute(x);
     }
 
@@ -112,15 +112,15 @@ fn test_transmute() {
 // Static/dynamic method dispatch
 
 struct Struct {
-    field: int
+    field: isize
 }
 
 trait Trait {
-    fn method(&self) -> int;
+    fn method(&self) -> isize;
 }
 
 impl Trait for Struct {
-    fn method(&self) -> int {
+    fn method(&self) -> isize {
         self.field
     }
 }
diff --git a/src/libcoretest/nonzero.rs b/src/libcoretest/nonzero.rs
index f60570eaaf4..7a367ddeec8 100644
--- a/src/libcoretest/nonzero.rs
+++ b/src/libcoretest/nonzero.rs
@@ -43,7 +43,7 @@ fn test_match_on_nonzero_option() {
 
 #[test]
 fn test_match_option_empty_vec() {
-    let a: Option<Vec<int>> = Some(vec![]);
+    let a: Option<Vec<isize>> = Some(vec![]);
     match a {
         None => panic!("unexpected None while matching on Some(vec![])"),
         _ => {}
diff --git a/src/libcoretest/ops.rs b/src/libcoretest/ops.rs
index 0183e6a93cf..33674a3abd8 100644
--- a/src/libcoretest/ops.rs
+++ b/src/libcoretest/ops.rs
@@ -14,7 +14,7 @@ use core::ops::{Range, RangeFull, RangeFrom, RangeTo};
 // Overhead of dtors
 
 struct HasDtor {
-    _x: int
+    _x: isize
 }
 
 impl Drop for HasDtor {
diff --git a/src/libcoretest/option.rs b/src/libcoretest/option.rs
index fe0b10e9119..1a7d8f83d70 100644
--- a/src/libcoretest/option.rs
+++ b/src/libcoretest/option.rs
@@ -17,10 +17,10 @@ use core::clone::Clone;
 fn test_get_ptr() {
     unsafe {
         let x: Box<_> = box 0;
-        let addr_x: *const int = mem::transmute(&*x);
+        let addr_x: *const isize = mem::transmute(&*x);
         let opt = Some(x);
         let y = opt.unwrap();
-        let addr_y: *const int = mem::transmute(&*y);
+        let addr_y: *const isize = mem::transmute(&*y);
         assert_eq!(addr_x, addr_y);
     }
 }
@@ -41,7 +41,7 @@ fn test_get_resource() {
     use core::cell::RefCell;
 
     struct R {
-       i: Rc<RefCell<int>>,
+       i: Rc<RefCell<isize>>,
     }
 
     #[unsafe_destructor]
@@ -53,7 +53,7 @@ fn test_get_resource() {
         }
     }
 
-    fn r(i: Rc<RefCell<int>>) -> R {
+    fn r(i: Rc<RefCell<isize>>) -> R {
         R {
             i: i
         }
@@ -89,44 +89,44 @@ fn test_option_too_much_dance() {
 
 #[test]
 fn test_and() {
-    let x: Option<int> = Some(1);
+    let x: Option<isize> = Some(1);
     assert_eq!(x.and(Some(2)), Some(2));
-    assert_eq!(x.and(None::<int>), None);
+    assert_eq!(x.and(None::<isize>), None);
 
-    let x: Option<int> = None;
+    let x: Option<isize> = None;
     assert_eq!(x.and(Some(2)), None);
-    assert_eq!(x.and(None::<int>), None);
+    assert_eq!(x.and(None::<isize>), None);
 }
 
 #[test]
 fn test_and_then() {
-    let x: Option<int> = Some(1);
+    let x: Option<isize> = Some(1);
     assert_eq!(x.and_then(|x| Some(x + 1)), Some(2));
-    assert_eq!(x.and_then(|_| None::<int>), None);
+    assert_eq!(x.and_then(|_| None::<isize>), None);
 
-    let x: Option<int> = None;
+    let x: Option<isize> = None;
     assert_eq!(x.and_then(|x| Some(x + 1)), None);
-    assert_eq!(x.and_then(|_| None::<int>), None);
+    assert_eq!(x.and_then(|_| None::<isize>), None);
 }
 
 #[test]
 fn test_or() {
-    let x: Option<int> = Some(1);
+    let x: Option<isize> = Some(1);
     assert_eq!(x.or(Some(2)), Some(1));
     assert_eq!(x.or(None), Some(1));
 
-    let x: Option<int> = None;
+    let x: Option<isize> = None;
     assert_eq!(x.or(Some(2)), Some(2));
     assert_eq!(x.or(None), None);
 }
 
 #[test]
 fn test_or_else() {
-    let x: Option<int> = Some(1);
+    let x: Option<isize> = Some(1);
     assert_eq!(x.or_else(|| Some(2)), Some(1));
     assert_eq!(x.or_else(|| None), Some(1));
 
-    let x: Option<int> = None;
+    let x: Option<isize> = None;
     assert_eq!(x.or_else(|| Some(2)), Some(2));
     assert_eq!(x.or_else(|| None), None);
 }
@@ -141,7 +141,7 @@ fn test_unwrap() {
 #[test]
 #[should_panic]
 fn test_unwrap_panic1() {
-    let x: Option<int> = None;
+    let x: Option<isize> = None;
     x.unwrap();
 }
 
@@ -154,19 +154,19 @@ fn test_unwrap_panic2() {
 
 #[test]
 fn test_unwrap_or() {
-    let x: Option<int> = Some(1);
+    let x: Option<isize> = Some(1);
     assert_eq!(x.unwrap_or(2), 1);
 
-    let x: Option<int> = None;
+    let x: Option<isize> = None;
     assert_eq!(x.unwrap_or(2), 2);
 }
 
 #[test]
 fn test_unwrap_or_else() {
-    let x: Option<int> = Some(1);
+    let x: Option<isize> = Some(1);
     assert_eq!(x.unwrap_or_else(|| 2), 1);
 
-    let x: Option<int> = None;
+    let x: Option<isize> = None;
     assert_eq!(x.unwrap_or_else(|| 2), 2);
 }
 
@@ -223,13 +223,13 @@ fn test_ord() {
 /* FIXME(#20575)
 #[test]
 fn test_collect() {
-    let v: Option<Vec<int>> = (0..0).map(|_| Some(0)).collect();
+    let v: Option<Vec<isize>> = (0..0).map(|_| Some(0)).collect();
     assert!(v == Some(vec![]));
 
-    let v: Option<Vec<int>> = (0..3).map(|x| Some(x)).collect();
+    let v: Option<Vec<isize>> = (0..3).map(|x| Some(x)).collect();
     assert!(v == Some(vec![0, 1, 2]));
 
-    let v: Option<Vec<int>> = (0..3).map(|x| {
+    let v: Option<Vec<isize>> = (0..3).map(|x| {
         if x > 1 { None } else { Some(x) }
     }).collect();
     assert!(v == None);
diff --git a/src/libcoretest/ptr.rs b/src/libcoretest/ptr.rs
index 4f5f269d437..bdb56c9f867 100644
--- a/src/libcoretest/ptr.rs
+++ b/src/libcoretest/ptr.rs
@@ -16,12 +16,12 @@ use std::iter::repeat;
 fn test() {
     unsafe {
         struct Pair {
-            fst: int,
-            snd: int
+            fst: isize,
+            snd: isize
         };
         let mut p = Pair {fst: 10, snd: 20};
         let pptr: *mut Pair = &mut p;
-        let iptr: *mut int = mem::transmute(pptr);
+        let iptr: *mut isize = mem::transmute(pptr);
         assert_eq!(*iptr, 10);
         *iptr = 30;
         assert_eq!(*iptr, 30);
@@ -55,13 +55,13 @@ fn test() {
 
 #[test]
 fn test_is_null() {
-    let p: *const int = null();
+    let p: *const isize = null();
     assert!(p.is_null());
 
     let q = unsafe { p.offset(1) };
     assert!(!q.is_null());
 
-    let mp: *mut int = null_mut();
+    let mp: *mut isize = null_mut();
     assert!(mp.is_null());
 
     let mq = unsafe { mp.offset(1) };
@@ -71,22 +71,22 @@ fn test_is_null() {
 #[test]
 fn test_as_ref() {
     unsafe {
-        let p: *const int = null();
+        let p: *const isize = null();
         assert_eq!(p.as_ref(), None);
 
-        let q: *const int = &2;
+        let q: *const isize = &2;
         assert_eq!(q.as_ref().unwrap(), &2);
 
-        let p: *mut int = null_mut();
+        let p: *mut isize = null_mut();
         assert_eq!(p.as_ref(), None);
 
-        let q: *mut int = &mut 2;
+        let q: *mut isize = &mut 2;
         assert_eq!(q.as_ref().unwrap(), &2);
 
         // Lifetime inference
         let u = 2isize;
         {
-            let p = &u as *const int;
+            let p = &u as *const isize;
             assert_eq!(p.as_ref().unwrap(), &2);
         }
     }
@@ -95,16 +95,16 @@ fn test_as_ref() {
 #[test]
 fn test_as_mut() {
     unsafe {
-        let p: *mut int = null_mut();
+        let p: *mut isize = null_mut();
         assert!(p.as_mut() == None);
 
-        let q: *mut int = &mut 2;
+        let q: *mut isize = &mut 2;
         assert!(q.as_mut().unwrap() == &mut 2);
 
         // Lifetime inference
         let mut u = 2isize;
         {
-            let p = &mut u as *mut int;
+            let p = &mut u as *mut isize;
             assert!(p.as_mut().unwrap() == &mut 2);
         }
     }
@@ -143,7 +143,7 @@ fn test_ptr_subtraction() {
         let ptr = xs.as_ptr();
 
         while idx >= 0 {
-            assert_eq!(*(ptr.offset(idx as int)), idx as int);
+            assert_eq!(*(ptr.offset(idx as isize)), idx as isize);
             idx = idx - 1;
         }
 
diff --git a/src/libcoretest/result.rs b/src/libcoretest/result.rs
index 1c175ba99f7..ac8c2b953ae 100644
--- a/src/libcoretest/result.rs
+++ b/src/libcoretest/result.rs
@@ -8,8 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-pub fn op1() -> Result<int, &'static str> { Ok(666) }
-pub fn op2() -> Result<int, &'static str> { Err("sadface") }
+pub fn op1() -> Result<isize, &'static str> { Ok(666) }
+pub fn op2() -> Result<isize, &'static str> { Err("sadface") }
 
 #[test]
 pub fn test_and() {
@@ -24,13 +24,13 @@ pub fn test_and() {
 
 #[test]
 pub fn test_and_then() {
-    assert_eq!(op1().and_then(|i| Ok::<int, &'static str>(i + 1)).unwrap(), 667);
-    assert_eq!(op1().and_then(|_| Err::<int, &'static str>("bad")).unwrap_err(),
+    assert_eq!(op1().and_then(|i| Ok::<isize, &'static str>(i + 1)).unwrap(), 667);
+    assert_eq!(op1().and_then(|_| Err::<isize, &'static str>("bad")).unwrap_err(),
                "bad");
 
-    assert_eq!(op2().and_then(|i| Ok::<int, &'static str>(i + 1)).unwrap_err(),
+    assert_eq!(op2().and_then(|i| Ok::<isize, &'static str>(i + 1)).unwrap_err(),
                "sadface");
-    assert_eq!(op2().and_then(|_| Err::<int, &'static str>("bad")).unwrap_err(),
+    assert_eq!(op2().and_then(|_| Err::<isize, &'static str>("bad")).unwrap_err(),
                "sadface");
 }
 
@@ -45,53 +45,53 @@ pub fn test_or() {
 
 #[test]
 pub fn test_or_else() {
-    assert_eq!(op1().or_else(|_| Ok::<int, &'static str>(667)).unwrap(), 666);
-    assert_eq!(op1().or_else(|e| Err::<int, &'static str>(e)).unwrap(), 666);
+    assert_eq!(op1().or_else(|_| Ok::<isize, &'static str>(667)).unwrap(), 666);
+    assert_eq!(op1().or_else(|e| Err::<isize, &'static str>(e)).unwrap(), 666);
 
-    assert_eq!(op2().or_else(|_| Ok::<int, &'static str>(667)).unwrap(), 667);
-    assert_eq!(op2().or_else(|e| Err::<int, &'static str>(e)).unwrap_err(),
+    assert_eq!(op2().or_else(|_| Ok::<isize, &'static str>(667)).unwrap(), 667);
+    assert_eq!(op2().or_else(|e| Err::<isize, &'static str>(e)).unwrap_err(),
                "sadface");
 }
 
 #[test]
 pub fn test_impl_map() {
-    assert!(Ok::<int, int>(1).map(|x| x + 1) == Ok(2));
-    assert!(Err::<int, int>(1).map(|x| x + 1) == Err(1));
+    assert!(Ok::<isize, isize>(1).map(|x| x + 1) == Ok(2));
+    assert!(Err::<isize, isize>(1).map(|x| x + 1) == Err(1));
 }
 
 #[test]
 pub fn test_impl_map_err() {
-    assert!(Ok::<int, int>(1).map_err(|x| x + 1) == Ok(1));
-    assert!(Err::<int, int>(1).map_err(|x| x + 1) == Err(2));
+    assert!(Ok::<isize, isize>(1).map_err(|x| x + 1) == Ok(1));
+    assert!(Err::<isize, isize>(1).map_err(|x| x + 1) == Err(2));
 }
 
 /* FIXME(#20575)
 #[test]
 fn test_collect() {
-    let v: Result<Vec<int>, ()> = (0..0).map(|_| Ok::<int, ()>(0)).collect();
+    let v: Result<Vec<isize>, ()> = (0..0).map(|_| Ok::<isize, ()>(0)).collect();
     assert!(v == Ok(vec![]));
 
-    let v: Result<Vec<int>, ()> = (0..3).map(|x| Ok::<int, ()>(x)).collect();
+    let v: Result<Vec<isize>, ()> = (0..3).map(|x| Ok::<isize, ()>(x)).collect();
     assert!(v == Ok(vec![0, 1, 2]));
 
-    let v: Result<Vec<int>, int> = (0..3).map(|x| {
+    let v: Result<Vec<isize>, isize> = (0..3).map(|x| {
         if x > 1 { Err(x) } else { Ok(x) }
     }).collect();
     assert!(v == Err(2));
 
     // test that it does not take more elements than it needs
-    let mut functions: [Box<Fn() -> Result<(), int>>; 3] =
+    let mut functions: [Box<Fn() -> Result<(), isize>>; 3] =
         [box || Ok(()), box || Err(1), box || panic!()];
 
-    let v: Result<Vec<()>, int> = functions.iter_mut().map(|f| (*f)()).collect();
+    let v: Result<Vec<()>, isize> = functions.iter_mut().map(|f| (*f)()).collect();
     assert!(v == Err(1));
 }
 */
 
 #[test]
 pub fn test_fmt_default() {
-    let ok: Result<int, &'static str> = Ok(100);
-    let err: Result<int, &'static str> = Err("Err");
+    let ok: Result<isize, &'static str> = Ok(100);
+    let err: Result<isize, &'static str> = Err("Err");
 
     let s = format!("{:?}", ok);
     assert_eq!(s, "Ok(100)");
@@ -101,8 +101,8 @@ pub fn test_fmt_default() {
 
 #[test]
 pub fn test_unwrap_or() {
-    let ok: Result<int, &'static str> = Ok(100);
-    let ok_err: Result<int, &'static str> = Err("Err");
+    let ok: Result<isize, &'static str> = Ok(100);
+    let ok_err: Result<isize, &'static str> = Err("Err");
 
     assert_eq!(ok.unwrap_or(50), 100);
     assert_eq!(ok_err.unwrap_or(50), 50);
@@ -110,7 +110,7 @@ pub fn test_unwrap_or() {
 
 #[test]
 pub fn test_unwrap_or_else() {
-    fn handler(msg: &'static str) -> int {
+    fn handler(msg: &'static str) -> isize {
         if msg == "I got this." {
             50
         } else {
@@ -118,8 +118,8 @@ pub fn test_unwrap_or_else() {
         }
     }
 
-    let ok: Result<int, &'static str> = Ok(100);
-    let ok_err: Result<int, &'static str> = Err("I got this.");
+    let ok: Result<isize, &'static str> = Ok(100);
+    let ok_err: Result<isize, &'static str> = Err("I got this.");
 
     assert_eq!(ok.unwrap_or_else(handler), 100);
     assert_eq!(ok_err.unwrap_or_else(handler), 50);
@@ -128,7 +128,7 @@ pub fn test_unwrap_or_else() {
 #[test]
 #[should_panic]
 pub fn test_unwrap_or_else_panic() {
-    fn handler(msg: &'static str) -> int {
+    fn handler(msg: &'static str) -> isize {
         if msg == "I got this." {
             50
         } else {
@@ -136,6 +136,6 @@ pub fn test_unwrap_or_else_panic() {
         }
     }
 
-    let bad_err: Result<int, &'static str> = Err("Unrecoverable mess.");
-    let _ : int = bad_err.unwrap_or_else(handler);
+    let bad_err: Result<isize, &'static str> = Err("Unrecoverable mess.");
+    let _ : isize = bad_err.unwrap_or_else(handler);
 }