about summary refs log tree commit diff
path: root/src/libnum
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2014-08-04 14:19:02 +0200
committerNick Cameron <ncameron@mozilla.com>2014-08-26 12:37:45 +1200
commit37a94b80f207e86017e54056ced2dc9674907ae3 (patch)
tree05fca5f77317c944b5d8da3198e8a0619fb60225 /src/libnum
parent34d607f9c9e3c103fc7f98b4c6fa18ff71905bb6 (diff)
downloadrust-37a94b80f207e86017e54056ced2dc9674907ae3.tar.gz
rust-37a94b80f207e86017e54056ced2dc9674907ae3.zip
Use temp vars for implicit coercion to ^[T]
Diffstat (limited to 'src/libnum')
-rw-r--r--src/libnum/bigint.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libnum/bigint.rs b/src/libnum/bigint.rs
index 48fc9fb4a38..ba45d2b2e73 100644
--- a/src/libnum/bigint.rs
+++ b/src/libnum/bigint.rs
@@ -1449,8 +1449,8 @@ mod biguint_tests {
 
     #[test]
     fn test_cmp() {
-        let data: Vec<BigUint> = [ &[], &[1], &[2], &[-1], &[0, 1], &[2, 1], &[1, 1, 1]  ]
-            .iter().map(|v| BigUint::from_slice(*v)).collect();
+        let data: [&[_], ..7] = [ &[], &[1], &[2], &[-1], &[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.slice(i, data.len()).iter().enumerate() {
                 let j = j0 + i;
@@ -2311,7 +2311,7 @@ mod bigint_tests {
 
     #[test]
     fn test_cmp() {
-        let vs = [ &[2 as BigDigit], &[1, 1], &[2, 1], &[1, 1, 1] ];
+        let vs: [&[BigDigit], ..4] = [ &[2 as BigDigit], &[1, 1], &[2, 1], &[1, 1, 1] ];
         let mut nums = Vec::new();
         for s in vs.iter().rev() {
             nums.push(BigInt::from_slice(Minus, *s));