From b57accf314355f79ef27dd398164c784823d5f12 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 10 Aug 2015 12:11:56 -0700 Subject: [PATCH] Update to rust nightly --- num-macros/src/lib.rs | 18 ++++++------------ src/bigint.rs | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/num-macros/src/lib.rs b/num-macros/src/lib.rs index e0159c7..b75c6bb 100644 --- a/num-macros/src/lib.rs +++ b/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, diff --git a/src/bigint.rs b/src/bigint.rs index 5c10c35..10a96eb 100644 --- a/src/bigint.rs +++ b/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 = data.iter().map(|v| BigUint::from_slice(*v)).collect(); for (i, ni) in data.iter().enumerate() { for (j0, nj) in data[i..].iter().enumerate() {