Browse Source

Update to rust nightly

Alex Crichton 9 years ago
parent
commit
b57accf314
2 changed files with 7 additions and 13 deletions
  1. 6 12
      num-macros/src/lib.rs
  2. 1 1
      src/bigint.rs

+ 6 - 12
num-macros/src/lib.rs

@@ -46,19 +46,13 @@ macro_rules! path_local {
 }
 
 macro_rules! pathvec_std {
-    ($cx:expr, $first:ident :: $($rest:ident)::+) => (
-        if $cx.use_std {
-            pathvec!(std :: $($rest)::+)
-        } else {
-            pathvec!($first :: $($rest)::+)
+    ($cx:expr, $first:ident :: $($rest:ident)::+) => ({
+        let mut v = pathvec!($($rest)::+);
+        if let Some(s) = $cx.crate_root {
+            v.insert(0, s);
         }
-    )
-}
-
-macro_rules! path_std {
-    ($($x:tt)*) => (
-        ::syntax::ext::deriving::generic::ty::Path::new( pathvec_std!( $($x)* ) )
-    )
+        v
+    })
 }
 
 pub fn expand_deriving_from_primitive(cx: &mut ExtCtxt,

+ 1 - 1
src/bigint.rs

@@ -1949,7 +1949,7 @@ mod biguint_tests {
 
     #[test]
     fn test_cmp() {
-        let data: [&[_]; 7] = [ &[], &[1], &[2], &[-1], &[0, 1], &[2, 1], &[1, 1, 1]  ];
+        let data: [&[_]; 7] = [ &[], &[1], &[2], &[!0], &[0, 1], &[2, 1], &[1, 1, 1]  ];
         let data: Vec<BigUint> = data.iter().map(|v| BigUint::from_slice(*v)).collect();
         for (i, ni) in data.iter().enumerate() {
             for (j0, nj) in data[i..].iter().enumerate() {