]> git.lizzy.rs Git - rust.git/commitdiff
Test fixes and rebase conflicts
authorAlex Crichton <alex@alexcrichton.com>
Fri, 27 Feb 2015 23:13:35 +0000 (15:13 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 27 Feb 2015 23:13:35 +0000 (15:13 -0800)
src/test/auxiliary/static-methods-crate.rs
src/test/run-pass/deriving-primitive.rs
src/test/run-pass/match-with-ret-arm.rs

index d84ded25702f4b38de4abf61bb5721b6e526068a..e61fb49add5b1e7aa5f53082113d483488178d3c 100644 (file)
 #![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()
     }
 }
index eb3cb30594ea808880b998a5c1513c054f038cb8..6b365c348f782b52f26c1d6e1e57500a312ee3a5 100644 (file)
@@ -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);
index 05c6aac90e39c9982830af973cf7a1b4119e9c5a..d2e27fc822eebe8323a641772db87038842e2e8c 100644 (file)
@@ -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
     };