about summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-03-11 17:50:45 -0800
committerbors <bors@rust-lang.org>2016-03-11 17:50:45 -0800
commitf1d6f126effd61c21c2134751b75b6e8924d65e3 (patch)
tree780c7a6e9898ef68bc2eb58dcc910a6971972189 /src/libcoretest
parent0d68aadd27b1a5f4090d995bfe8076958d438479 (diff)
parent10e4e9eec9faa935903e8a8b1dd2c2b13a8469e6 (diff)
downloadrust-f1d6f126effd61c21c2134751b75b6e8924d65e3.tar.gz
rust-f1d6f126effd61c21c2134751b75b6e8924d65e3.zip
Auto merge of #32200 - Manishearth:rollup, r=Manishearth
Rollup of 11 pull requests

- Successful merges: #32137, #32158, #32171, #32174, #32178, #32179, #32180, #32181, #32183, #32186, #32197
- Failed merges:
Diffstat (limited to 'src/libcoretest')
-rw-r--r--src/libcoretest/fmt/builders.rs20
-rw-r--r--src/libcoretest/iter.rs8
-rw-r--r--src/libcoretest/num/int_macros.rs8
-rw-r--r--src/libcoretest/num/mod.rs4
-rw-r--r--src/libcoretest/option.rs6
5 files changed, 23 insertions, 23 deletions
diff --git a/src/libcoretest/fmt/builders.rs b/src/libcoretest/fmt/builders.rs
index 885ee3f9c3b..e71e61bda5e 100644
--- a/src/libcoretest/fmt/builders.rs
+++ b/src/libcoretest/fmt/builders.rs
@@ -53,7 +53,7 @@ mod debug_struct {
             fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
                 fmt.debug_struct("Foo")
                     .field("bar", &true)
-                    .field("baz", &format_args!("{}/{}", 10i32, 20i32))
+                    .field("baz", &format_args!("{}/{}", 10, 20))
                     .finish()
             }
         }
@@ -75,7 +75,7 @@ mod debug_struct {
             fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
                 fmt.debug_struct("Foo")
                     .field("bar", &true)
-                    .field("baz", &format_args!("{}/{}", 10i32, 20i32))
+                    .field("baz", &format_args!("{}/{}", 10, 20))
                     .finish()
             }
         }
@@ -150,7 +150,7 @@ mod debug_tuple {
             fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
                 fmt.debug_tuple("Foo")
                     .field(&true)
-                    .field(&format_args!("{}/{}", 10i32, 20i32))
+                    .field(&format_args!("{}/{}", 10, 20))
                     .finish()
             }
         }
@@ -172,7 +172,7 @@ mod debug_tuple {
             fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
                 fmt.debug_tuple("Foo")
                     .field(&true)
-                    .field(&format_args!("{}/{}", 10i32, 20i32))
+                    .field(&format_args!("{}/{}", 10, 20))
                     .finish()
             }
         }
@@ -247,7 +247,7 @@ mod debug_map {
             fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
                 fmt.debug_map()
                     .entry(&"bar", &true)
-                    .entry(&10i32, &format_args!("{}/{}", 10i32, 20i32))
+                    .entry(&10, &format_args!("{}/{}", 10, 20))
                     .finish()
             }
         }
@@ -269,7 +269,7 @@ mod debug_map {
             fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
                 fmt.debug_map()
                     .entry(&"bar", &true)
-                    .entry(&10i32, &format_args!("{}/{}", 10i32, 20i32))
+                    .entry(&10, &format_args!("{}/{}", 10, 20))
                     .finish()
             }
         }
@@ -348,7 +348,7 @@ mod debug_set {
             fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
                 fmt.debug_set()
                     .entry(&true)
-                    .entry(&format_args!("{}/{}", 10i32, 20i32))
+                    .entry(&format_args!("{}/{}", 10, 20))
                     .finish()
             }
         }
@@ -370,7 +370,7 @@ mod debug_set {
             fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
                 fmt.debug_set()
                     .entry(&true)
-                    .entry(&format_args!("{}/{}", 10i32, 20i32))
+                    .entry(&format_args!("{}/{}", 10, 20))
                     .finish()
             }
         }
@@ -445,7 +445,7 @@ mod debug_list {
             fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
                 fmt.debug_list()
                     .entry(&true)
-                    .entry(&format_args!("{}/{}", 10i32, 20i32))
+                    .entry(&format_args!("{}/{}", 10, 20))
                     .finish()
             }
         }
@@ -467,7 +467,7 @@ mod debug_list {
             fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
                 fmt.debug_list()
                     .entry(&true)
-                    .entry(&format_args!("{}/{}", 10i32, 20i32))
+                    .entry(&format_args!("{}/{}", 10, 20))
                     .finish()
             }
         }
diff --git a/src/libcoretest/iter.rs b/src/libcoretest/iter.rs
index acdced64928..6c0cb03b5f7 100644
--- a/src/libcoretest/iter.rs
+++ b/src/libcoretest/iter.rs
@@ -677,7 +677,7 @@ fn test_rev() {
 
 #[test]
 fn test_cloned() {
-    let xs = [2u8, 4, 6, 8];
+    let xs = [2, 4, 6, 8];
 
     let mut it = xs.iter().cloned();
     assert_eq!(it.len(), 4);
@@ -861,8 +861,8 @@ fn test_range() {
     assert_eq!((-10..-1).size_hint(), (9, Some(9)));
     assert_eq!((-1..-10).size_hint(), (0, Some(0)));
 
-    assert_eq!((-70..58i8).size_hint(), (128, Some(128)));
-    assert_eq!((-128..127i8).size_hint(), (255, Some(255)));
+    assert_eq!((-70..58).size_hint(), (128, Some(128)));
+    assert_eq!((-128..127).size_hint(), (255, Some(255)));
     assert_eq!((-2..isize::MAX).size_hint(),
                (isize::MAX as usize + 2, Some(isize::MAX as usize + 2)));
 }
@@ -1013,7 +1013,7 @@ fn bench_max_by_key2(b: &mut Bencher) {
         array.iter().enumerate().max_by_key(|&(_, item)| item).unwrap().0
     }
 
-    let mut data = vec![0i32; 1638];
+    let mut data = vec![0; 1638];
     data[514] = 9999;
 
     b.iter(|| max_index_iter(&data));
diff --git a/src/libcoretest/num/int_macros.rs b/src/libcoretest/num/int_macros.rs
index afcf836ad10..8d791283ab8 100644
--- a/src/libcoretest/num/int_macros.rs
+++ b/src/libcoretest/num/int_macros.rs
@@ -208,11 +208,11 @@ mod tests {
     fn test_pow() {
         let mut r = 2 as $T;
 
-        assert_eq!(r.pow(2u32), 4 as $T);
-        assert_eq!(r.pow(0u32), 1 as $T);
+        assert_eq!(r.pow(2), 4 as $T);
+        assert_eq!(r.pow(0), 1 as $T);
         r = -2 as $T;
-        assert_eq!(r.pow(2u32), 4 as $T);
-        assert_eq!(r.pow(3u32), -8 as $T);
+        assert_eq!(r.pow(2), 4 as $T);
+        assert_eq!(r.pow(3), -8 as $T);
     }
 }
 
diff --git a/src/libcoretest/num/mod.rs b/src/libcoretest/num/mod.rs
index fba56db32bb..11c1bd667fb 100644
--- a/src/libcoretest/num/mod.rs
+++ b/src/libcoretest/num/mod.rs
@@ -99,8 +99,8 @@ mod tests {
 
     #[test]
     fn test_leading_plus() {
-        assert_eq!("+127".parse::<u8>().ok(), Some(127u8));
-        assert_eq!("+9223372036854775807".parse::<i64>().ok(), Some(9223372036854775807i64));
+        assert_eq!("+127".parse::<u8>().ok(), Some(127));
+        assert_eq!("+9223372036854775807".parse::<i64>().ok(), Some(9223372036854775807));
     }
 
     #[test]
diff --git a/src/libcoretest/option.rs b/src/libcoretest/option.rs
index 3e564cf1970..51b0655f680 100644
--- a/src/libcoretest/option.rs
+++ b/src/libcoretest/option.rs
@@ -251,7 +251,7 @@ fn test_collect() {
 
 #[test]
 fn test_cloned() {
-    let val = 1u32;
+    let val = 1;
     let val_ref = &val;
     let opt_none: Option<&'static u32> = None;
     let opt_ref = Some(&val);
@@ -263,10 +263,10 @@ fn test_cloned() {
 
     // Immutable ref works
     assert_eq!(opt_ref.clone(), Some(&val));
-    assert_eq!(opt_ref.cloned(), Some(1u32));
+    assert_eq!(opt_ref.cloned(), Some(1));
 
     // Double Immutable ref works
     assert_eq!(opt_ref_ref.clone(), Some(&val_ref));
     assert_eq!(opt_ref_ref.clone().cloned(), Some(&val));
-    assert_eq!(opt_ref_ref.cloned().cloned(), Some(1u32));
+    assert_eq!(opt_ref_ref.cloned().cloned(), Some(1));
 }