about summary refs log tree commit diff
path: root/src/libstd
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/libstd
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/libstd')
-rw-r--r--src/libstd/sync/mpsc/shared.rs1
-rw-r--r--src/libstd/sync/mpsc/stream.rs1
-rw-r--r--src/libstd/sync/mpsc/sync.rs1
-rw-r--r--src/libstd/sys/hermit/thread.rs1
4 files changed, 0 insertions, 4 deletions
diff --git a/src/libstd/sync/mpsc/shared.rs b/src/libstd/sync/mpsc/shared.rs
index 2b0393573fd..c4e929624d7 100644
--- a/src/libstd/sync/mpsc/shared.rs
+++ b/src/libstd/sync/mpsc/shared.rs
@@ -12,7 +12,6 @@ use self::StartResult::*;
 
 use core::cmp;
 use core::intrinsics::abort;
-use core::isize;
 
 use crate::cell::UnsafeCell;
 use crate::ptr;
diff --git a/src/libstd/sync/mpsc/stream.rs b/src/libstd/sync/mpsc/stream.rs
index 2e3270e81fc..f33493ee0c9 100644
--- a/src/libstd/sync/mpsc/stream.rs
+++ b/src/libstd/sync/mpsc/stream.rs
@@ -11,7 +11,6 @@ use self::Message::*;
 pub use self::UpgradeResult::*;
 
 use core::cmp;
-use core::isize;
 
 use crate::cell::UnsafeCell;
 use crate::ptr;
diff --git a/src/libstd/sync/mpsc/sync.rs b/src/libstd/sync/mpsc/sync.rs
index 79e86817154..3e2050799cc 100644
--- a/src/libstd/sync/mpsc/sync.rs
+++ b/src/libstd/sync/mpsc/sync.rs
@@ -26,7 +26,6 @@ use self::Blocker::*;
 pub use self::Failure::*;
 
 use core::intrinsics::abort;
-use core::isize;
 use core::mem;
 use core::ptr;
 
diff --git a/src/libstd/sys/hermit/thread.rs b/src/libstd/sys/hermit/thread.rs
index c7bea168f34..34f88eea0d7 100644
--- a/src/libstd/sys/hermit/thread.rs
+++ b/src/libstd/sys/hermit/thread.rs
@@ -6,7 +6,6 @@ use crate::io;
 use crate::mem;
 use crate::sys::hermit::abi;
 use crate::time::Duration;
-use core::u32;
 
 pub type Tid = abi::Tid;