about summary refs log tree commit diff
path: root/src/liballoc/tests
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-04-05 18:47:45 +0200
committerGitHub <noreply@github.com>2020-04-05 18:47:45 +0200
commitc2595539e7fd3e8b1986d30c25d8bf8717402bec (patch)
treee55ef7c5a7087789f63b6ec958b1315ac02df93f /src/liballoc/tests
parent829154f9807801b55317c4c4eea887829434c758 (diff)
parent101085ad9fd26a5e18f4c76dcc72b34d8edbdbe6 (diff)
downloadrust-c2595539e7fd3e8b1986d30c25d8bf8717402bec.tar.gz
rust-c2595539e7fd3e8b1986d30c25d8bf8717402bec.zip
Rollup merge of #70777 - faern:use-assoc-int-consts2, r=dtolnay
Don't import integer and float modules, use assoc consts

Stop importing the standard library integer and float modules to reach the `MIN`, `MAX` and other constants. They are available directly on the primitive types now.

This PR is a follow up of #69860 which made sure we use the new constants in documentation.

This type of change touches a lot of files, and previously all my assoc int consts PRs had collisions and were accepted only after a long delay. So I'd prefer to do it in smaller steps now. Just removing these imports seem like a good next step.

r? @dtolnay
Diffstat (limited to 'src/liballoc/tests')
-rw-r--r--src/liballoc/tests/string.rs1
-rw-r--r--src/liballoc/tests/vec.rs1
-rw-r--r--src/liballoc/tests/vec_deque.rs1
3 files changed, 0 insertions, 3 deletions
diff --git a/src/liballoc/tests/string.rs b/src/liballoc/tests/string.rs
index d2f09eb4a75..6e2a5abe90d 100644
--- a/src/liballoc/tests/string.rs
+++ b/src/liballoc/tests/string.rs
@@ -1,7 +1,6 @@
 use std::borrow::Cow;
 use std::collections::TryReserveError::*;
 use std::mem::size_of;
-use std::{isize, usize};
 
 pub trait IntoCow<'a, B: ?Sized>
 where
diff --git a/src/liballoc/tests/vec.rs b/src/liballoc/tests/vec.rs
index 6321e7154e7..b63d81796f9 100644
--- a/src/liballoc/tests/vec.rs
+++ b/src/liballoc/tests/vec.rs
@@ -3,7 +3,6 @@ use std::collections::TryReserveError::*;
 use std::mem::size_of;
 use std::panic::{catch_unwind, AssertUnwindSafe};
 use std::vec::{Drain, IntoIter};
-use std::{isize, usize};
 
 struct DropCounter<'a> {
     count: &'a mut u32,
diff --git a/src/liballoc/tests/vec_deque.rs b/src/liballoc/tests/vec_deque.rs
index 101dd67d97a..c287d56fa53 100644
--- a/src/liballoc/tests/vec_deque.rs
+++ b/src/liballoc/tests/vec_deque.rs
@@ -3,7 +3,6 @@ use std::collections::{vec_deque::Drain, VecDeque};
 use std::fmt::Debug;
 use std::mem::size_of;
 use std::panic::{catch_unwind, AssertUnwindSafe};
-use std::{isize, usize};
 
 use crate::hash;