From fdfb532d7829d6e5637ddffa6faff69e4312b0e0 Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Tue, 17 Feb 2015 17:41:40 +0200 Subject: [PATCH] tests: remove warnings from and rename const-polymorphic-paths to ufcs-polymorphic-paths. --- ...hic-paths.rs => ufcs-polymorphic-paths.rs} | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) rename src/test/run-pass/{const-polymorphic-paths.rs => ufcs-polymorphic-paths.rs} (62%) diff --git a/src/test/run-pass/const-polymorphic-paths.rs b/src/test/run-pass/ufcs-polymorphic-paths.rs similarity index 62% rename from src/test/run-pass/const-polymorphic-paths.rs rename to src/test/run-pass/ufcs-polymorphic-paths.rs index 23d90c5ee292..277aaf086f41 100644 --- a/src/test/run-pass/const-polymorphic-paths.rs +++ b/src/test/run-pass/ufcs-polymorphic-paths.rs @@ -27,11 +27,11 @@ struct Newt(T); fn id(x: T) -> T { x } fn eq(a: T, b: T) -> bool { a == b } fn u8_as_i8(x: u8) -> i8 { x as i8 } -fn odd(x: uint) -> bool { x % 2 == 1 } +fn odd(x: usize) -> bool { x % 2 == 1 } fn dummy_rng() -> DummyRng { DummyRng::new_unseeded() } trait Size: Sized { - fn size() -> uint { std::mem::size_of::() } + fn size() -> usize { std::mem::size_of::() } } impl Size for T {} @@ -47,24 +47,24 @@ macro_rules! tests { tests! { // Free function. - id, fn(int) -> int, (5); - id::, fn(int) -> int, (5); + id, fn(i32) -> i32, (5); + id::, fn(i32) -> i32, (5); // Enum variant constructor. - Some, fn(int) -> Option, (5); - Some::, fn(int) -> Option, (5); + Some, fn(i32) -> Option, (5); + Some::, fn(i32) -> Option, (5); // Tuple struct constructor. - Newt, fn(int) -> Newt, (5); - Newt::, fn(int) -> Newt, (5); + Newt, fn(i32) -> Newt, (5); + Newt::, fn(i32) -> Newt, (5); // Inherent static methods. Vec::new, fn() -> Vec<()>, (); Vec::<()>::new, fn() -> Vec<()>, (); - Vec::with_capacity, fn(uint) -> Vec<()>, (5); - Vec::<()>::with_capacity, fn(uint) -> Vec<()>, (5); - BitVec::from_fn, fn(uint, fn(uint) -> bool) -> BitVec, (5, odd); - BitVec::from_fn:: bool>, fn(uint, fn(uint) -> bool) -> BitVec, (5, odd); + Vec::with_capacity, fn(usize) -> Vec<()>, (5); + Vec::<()>::with_capacity, fn(usize) -> Vec<()>, (5); + BitVec::from_fn, fn(usize, fn(usize) -> bool) -> BitVec, (5, odd); + BitVec::from_fn:: bool>, fn(usize, fn(usize) -> bool) -> BitVec, (5, odd); // Inherent non-static method. Vec::map_in_place, fn(Vec, fn(u8) -> i8) -> Vec, (vec![b'f', b'o', b'o'], u8_as_i8); @@ -77,34 +77,34 @@ tests! { // , (vec![b'f', b'o', b'o'], u8_as_i8); // Trait static methods. - bool::size, fn() -> uint, (); - ::size, fn() -> uint, (); + bool::size, fn() -> usize, (); + ::size, fn() -> usize, (); - Default::default, fn() -> int, (); - int::default, fn() -> int, (); - ::default, fn() -> int, (); + Default::default, fn() -> i32, (); + i32::default, fn() -> i32, (); + ::default, fn() -> i32, (); - Rand::rand, fn(&mut DummyRng) -> int, (&mut dummy_rng()); - int::rand, fn(&mut DummyRng) -> int, (&mut dummy_rng()); - ::rand, fn(&mut DummyRng) -> int, (&mut dummy_rng()); - Rand::rand::, fn(&mut DummyRng) -> int, (&mut dummy_rng()); - int::rand::, fn(&mut DummyRng) -> int, (&mut dummy_rng()); - ::rand::, fn(&mut DummyRng) -> int, (&mut dummy_rng()); + Rand::rand, fn(&mut DummyRng) -> i32, (&mut dummy_rng()); + i32::rand, fn(&mut DummyRng) -> i32, (&mut dummy_rng()); + ::rand, fn(&mut DummyRng) -> i32, (&mut dummy_rng()); + Rand::rand::, fn(&mut DummyRng) -> i32, (&mut dummy_rng()); + i32::rand::, fn(&mut DummyRng) -> i32, (&mut dummy_rng()); + ::rand::, fn(&mut DummyRng) -> i32, (&mut dummy_rng()); // Trait non-static methods. - Clone::clone, fn(&int) -> int, (&5); - int::clone, fn(&int) -> int, (&5); - ::clone, fn(&int) -> int, (&5); + Clone::clone, fn(&i32) -> i32, (&5); + i32::clone, fn(&i32) -> i32, (&5); + ::clone, fn(&i32) -> i32, (&5); - FromIterator::from_iter, fn(OptionIter) -> Vec, (Some(5).into_iter()); - Vec::from_iter, fn(OptionIter) -> Vec, (Some(5).into_iter()); - as FromIterator<_>>::from_iter, fn(OptionIter) -> Vec, + FromIterator::from_iter, fn(OptionIter) -> Vec, (Some(5).into_iter()); + Vec::from_iter, fn(OptionIter) -> Vec, (Some(5).into_iter()); + as FromIterator<_>>::from_iter, fn(OptionIter) -> Vec, (Some(5).into_iter()); - as FromIterator<_>>::from_iter, fn(OptionIter) -> Vec, + as FromIterator<_>>::from_iter, fn(OptionIter) -> Vec, (Some(5).into_iter()); - FromIterator::from_iter::>, fn(OptionIter) -> Vec, + FromIterator::from_iter::>, fn(OptionIter) -> Vec, (Some(5).into_iter()); - as FromIterator<_>>::from_iter::>, fn(OptionIter) -> Vec, + as FromIterator<_>>::from_iter::>, fn(OptionIter) -> Vec, (Some(5).into_iter()); Add::add, fn(i32, i32) -> i32, (5, 6);