diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2016-03-28 13:48:28 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2016-03-28 13:48:28 -0400 |
| commit | f2c6b51dc051e143ab634b11d4bd0b08ba26fb85 (patch) | |
| tree | 1394e51bf680deb6faad26a0f837b5ac1a34c220 | |
| parent | 53a03b5ed207907dd725e88386762dbcc2ca712f (diff) | |
| parent | 91a42bedcf251609333acf65761027a4280ba4ca (diff) | |
| download | rust-f2c6b51dc051e143ab634b11d4bd0b08ba26fb85.tar.gz rust-f2c6b51dc051e143ab634b11d4bd0b08ba26fb85.zip | |
Rollup merge of #32177 - srinivasreddy:remove_integer_suffixes, r=steveklabnik
first round of removal of integer suffixes
| -rw-r--r-- | src/liballoc/arc.rs | 8 | ||||
| -rw-r--r-- | src/liballoc/rc.rs | 4 | ||||
| -rw-r--r-- | src/libcollections/linked_list.rs | 16 | ||||
| -rw-r--r-- | src/libcollectionstest/slice.rs | 8 |
4 files changed, 18 insertions, 18 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index b5d7279edb0..1dac7dca348 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -107,7 +107,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize; /// use std::thread; /// /// fn main() { -/// let numbers: Vec<_> = (0..100u32).collect(); +/// let numbers: Vec<_> = (0..100).collect(); /// let shared_numbers = Arc::new(numbers); /// /// for _ in 0..10 { @@ -1118,7 +1118,7 @@ mod tests { #[test] fn test_strong_count() { - let a = Arc::new(0u32); + let a = Arc::new(0); assert!(Arc::strong_count(&a) == 1); let w = Arc::downgrade(&a); assert!(Arc::strong_count(&a) == 1); @@ -1135,7 +1135,7 @@ mod tests { #[test] fn test_weak_count() { - let a = Arc::new(0u32); + let a = Arc::new(0); assert!(Arc::strong_count(&a) == 1); assert!(Arc::weak_count(&a) == 0); let w = Arc::downgrade(&a); @@ -1161,7 +1161,7 @@ mod tests { #[test] fn show_arc() { - let a = Arc::new(5u32); + let a = Arc::new(5); assert_eq!(format!("{:?}", a), "5"); } diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index dc283f5acdf..da803f57a59 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -1014,7 +1014,7 @@ mod tests { #[test] fn test_strong_count() { - let a = Rc::new(0u32); + let a = Rc::new(0); assert!(Rc::strong_count(&a) == 1); let w = Rc::downgrade(&a); assert!(Rc::strong_count(&a) == 1); @@ -1031,7 +1031,7 @@ mod tests { #[test] fn test_weak_count() { - let a = Rc::new(0u32); + let a = Rc::new(0); assert!(Rc::strong_count(&a) == 1); assert!(Rc::weak_count(&a) == 0); let w = Rc::downgrade(&a); diff --git a/src/libcollections/linked_list.rs b/src/libcollections/linked_list.rs index 6a7944bc9a2..85a4fa82e2a 100644 --- a/src/libcollections/linked_list.rs +++ b/src/libcollections/linked_list.rs @@ -1305,10 +1305,10 @@ mod tests { // // https://github.com/rust-lang/rust/issues/26021 let mut v1 = LinkedList::new(); - v1.push_front(1u8); - v1.push_front(1u8); - v1.push_front(1u8); - v1.push_front(1u8); + v1.push_front(1); + v1.push_front(1); + v1.push_front(1); + v1.push_front(1); let _ = v1.split_off(3); // Dropping this now should not cause laundry consumption assert_eq!(v1.len(), 3); @@ -1319,10 +1319,10 @@ mod tests { #[test] fn test_split_off() { let mut v1 = LinkedList::new(); - v1.push_front(1u8); - v1.push_front(1u8); - v1.push_front(1u8); - v1.push_front(1u8); + v1.push_front(1); + v1.push_front(1); + v1.push_front(1); + v1.push_front(1); // test all splits for ix in 0..1 + v1.len() { diff --git a/src/libcollectionstest/slice.rs b/src/libcollectionstest/slice.rs index 56741f0e595..ca2ee0c512b 100644 --- a/src/libcollectionstest/slice.rs +++ b/src/libcollectionstest/slice.rs @@ -267,9 +267,9 @@ fn test_swap_remove_fail() { fn test_swap_remove_noncopyable() { // Tests that we don't accidentally run destructors twice. let mut v: Vec<Box<_>> = Vec::new(); - v.push(box 0u8); - v.push(box 0u8); - v.push(box 0u8); + v.push(box 0); + v.push(box 0); + v.push(box 0); let mut _e = v.swap_remove(0); assert_eq!(v.len(), 2); _e = v.swap_remove(1); @@ -884,7 +884,7 @@ fn test_overflow_does_not_cause_segfault_managed() { #[test] fn test_mut_split_at() { - let mut values = [1u8,2,3,4,5]; + let mut values = [1,2,3,4,5]; { let (left, right) = values.split_at_mut(2); { |
