Rollup merge of #32177 - srinivasreddy:remove_integer_suffixes, r=steveklabnik

first round of removal of integer suffixes
This commit is contained in:
Steve Klabnik
2016-03-28 13:48:28 -04:00
4 changed files with 18 additions and 18 deletions

View File

@@ -107,7 +107,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
/// use std::thread; /// use std::thread;
/// ///
/// fn main() { /// fn main() {
/// let numbers: Vec<_> = (0..100u32).collect(); /// let numbers: Vec<_> = (0..100).collect();
/// let shared_numbers = Arc::new(numbers); /// let shared_numbers = Arc::new(numbers);
/// ///
/// for _ in 0..10 { /// for _ in 0..10 {
@@ -1118,7 +1118,7 @@ mod tests {
#[test] #[test]
fn test_strong_count() { fn test_strong_count() {
let a = Arc::new(0u32); let a = Arc::new(0);
assert!(Arc::strong_count(&a) == 1); assert!(Arc::strong_count(&a) == 1);
let w = Arc::downgrade(&a); let w = Arc::downgrade(&a);
assert!(Arc::strong_count(&a) == 1); assert!(Arc::strong_count(&a) == 1);
@@ -1135,7 +1135,7 @@ mod tests {
#[test] #[test]
fn test_weak_count() { fn test_weak_count() {
let a = Arc::new(0u32); let a = Arc::new(0);
assert!(Arc::strong_count(&a) == 1); assert!(Arc::strong_count(&a) == 1);
assert!(Arc::weak_count(&a) == 0); assert!(Arc::weak_count(&a) == 0);
let w = Arc::downgrade(&a); let w = Arc::downgrade(&a);
@@ -1161,7 +1161,7 @@ mod tests {
#[test] #[test]
fn show_arc() { fn show_arc() {
let a = Arc::new(5u32); let a = Arc::new(5);
assert_eq!(format!("{:?}", a), "5"); assert_eq!(format!("{:?}", a), "5");
} }

View File

@@ -1014,7 +1014,7 @@ mod tests {
#[test] #[test]
fn test_strong_count() { fn test_strong_count() {
let a = Rc::new(0u32); let a = Rc::new(0);
assert!(Rc::strong_count(&a) == 1); assert!(Rc::strong_count(&a) == 1);
let w = Rc::downgrade(&a); let w = Rc::downgrade(&a);
assert!(Rc::strong_count(&a) == 1); assert!(Rc::strong_count(&a) == 1);
@@ -1031,7 +1031,7 @@ mod tests {
#[test] #[test]
fn test_weak_count() { fn test_weak_count() {
let a = Rc::new(0u32); let a = Rc::new(0);
assert!(Rc::strong_count(&a) == 1); assert!(Rc::strong_count(&a) == 1);
assert!(Rc::weak_count(&a) == 0); assert!(Rc::weak_count(&a) == 0);
let w = Rc::downgrade(&a); let w = Rc::downgrade(&a);

View File

@@ -1305,10 +1305,10 @@ mod tests {
// //
// https://github.com/rust-lang/rust/issues/26021 // https://github.com/rust-lang/rust/issues/26021
let mut v1 = LinkedList::new(); let mut v1 = LinkedList::new();
v1.push_front(1u8); v1.push_front(1);
v1.push_front(1u8); v1.push_front(1);
v1.push_front(1u8); v1.push_front(1);
v1.push_front(1u8); v1.push_front(1);
let _ = v1.split_off(3); // Dropping this now should not cause laundry consumption let _ = v1.split_off(3); // Dropping this now should not cause laundry consumption
assert_eq!(v1.len(), 3); assert_eq!(v1.len(), 3);
@@ -1319,10 +1319,10 @@ mod tests {
#[test] #[test]
fn test_split_off() { fn test_split_off() {
let mut v1 = LinkedList::new(); let mut v1 = LinkedList::new();
v1.push_front(1u8); v1.push_front(1);
v1.push_front(1u8); v1.push_front(1);
v1.push_front(1u8); v1.push_front(1);
v1.push_front(1u8); v1.push_front(1);
// test all splits // test all splits
for ix in 0..1 + v1.len() { for ix in 0..1 + v1.len() {

View File

@@ -267,9 +267,9 @@ fn test_swap_remove_fail() {
fn test_swap_remove_noncopyable() { fn test_swap_remove_noncopyable() {
// Tests that we don't accidentally run destructors twice. // Tests that we don't accidentally run destructors twice.
let mut v: Vec<Box<_>> = Vec::new(); let mut v: Vec<Box<_>> = Vec::new();
v.push(box 0u8); v.push(box 0);
v.push(box 0u8); v.push(box 0);
v.push(box 0u8); v.push(box 0);
let mut _e = v.swap_remove(0); let mut _e = v.swap_remove(0);
assert_eq!(v.len(), 2); assert_eq!(v.len(), 2);
_e = v.swap_remove(1); _e = v.swap_remove(1);
@@ -884,7 +884,7 @@ fn test_overflow_does_not_cause_segfault_managed() {
#[test] #[test]
fn test_mut_split_at() { 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); let (left, right) = values.split_at_mut(2);
{ {