about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-04-22 03:50:02 +0000
committerbors <bors@rust-lang.org>2020-04-22 03:50:02 +0000
commit2dc5b602eee35d70e8e6e506a7ea07b6c7e0197d (patch)
tree43279f0eee2bf88591559449b56f87b217873337 /src/libcore
parent70f4f320b02cfd511c78389a6db1628285277410 (diff)
parent66eaead0e2088e5bad6e5c24287a5f061aab4844 (diff)
downloadrust-2dc5b602eee35d70e8e6e506a7ea07b6c7e0197d.tar.gz
rust-2dc5b602eee35d70e8e6e506a7ea07b6c7e0197d.zip
Auto merge of #71410 - JohnTitor:rollup-vh6dut5, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #70998 (Suggest `-> impl Trait` and `-> Box<dyn Trait>` on fn that doesn't return)
 - #71236 (Remove unused rustc_serialize::hex module)
 - #71366 (Use assoc int consts3)
 - #71372 (Fix #! (shebang) stripping account space issue)
 - #71384 (Fix stage0.txt version number comment)
 - #71390 (Fix incorrect description of E0690)
 - #71399 (Clean up E0554 explanation)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/iter/adapters/mod.rs1
-rw-r--r--src/libcore/iter/range.rs1
-rw-r--r--src/libcore/iter/sources.rs1
-rw-r--r--src/libcore/num/f32.rs4
-rw-r--r--src/libcore/num/f64.rs4
-rw-r--r--src/libcore/num/flt2dec/decoder.rs1
-rw-r--r--src/libcore/num/flt2dec/mod.rs1
-rw-r--r--src/libcore/num/int_macros.rs4
-rw-r--r--src/libcore/slice/memchr.rs2
-rw-r--r--src/libcore/slice/mod.rs1
-rw-r--r--src/libcore/str/pattern.rs1
-rw-r--r--src/libcore/time.rs2
12 files changed, 8 insertions, 15 deletions
diff --git a/src/libcore/iter/adapters/mod.rs b/src/libcore/iter/adapters/mod.rs
index 16738543eb3..e9fc1b612dd 100644
--- a/src/libcore/iter/adapters/mod.rs
+++ b/src/libcore/iter/adapters/mod.rs
@@ -2,7 +2,6 @@ use crate::cmp;
 use crate::fmt;
 use crate::intrinsics;
 use crate::ops::{Add, AddAssign, Try};
-use crate::usize;
 
 use super::{from_fn, LoopState};
 use super::{DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator, TrustedLen};
diff --git a/src/libcore/iter/range.rs b/src/libcore/iter/range.rs
index 28fbd00f36b..37369289c51 100644
--- a/src/libcore/iter/range.rs
+++ b/src/libcore/iter/range.rs
@@ -1,7 +1,6 @@
 use crate::convert::TryFrom;
 use crate::mem;
 use crate::ops::{self, Add, Sub, Try};
-use crate::usize;
 
 use super::{FusedIterator, TrustedLen};
 
diff --git a/src/libcore/iter/sources.rs b/src/libcore/iter/sources.rs
index a1d4e1b31e9..d76fa89bd01 100644
--- a/src/libcore/iter/sources.rs
+++ b/src/libcore/iter/sources.rs
@@ -1,6 +1,5 @@
 use crate::fmt;
 use crate::marker;
-use crate::usize;
 
 use super::{FusedIterator, TrustedLen};
 
diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs
index 6be108f280e..32f49563289 100644
--- a/src/libcore/num/f32.rs
+++ b/src/libcore/num/f32.rs
@@ -265,7 +265,7 @@ impl f32 {
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]
     pub fn is_infinite(self) -> bool {
-        self.abs_private() == INFINITY
+        self.abs_private() == Self::INFINITY
     }
 
     /// Returns `true` if this number is neither infinite nor `NaN`.
@@ -287,7 +287,7 @@ impl f32 {
     pub fn is_finite(self) -> bool {
         // There's no need to handle NaN separately: if self is NaN,
         // the comparison is not true, exactly as desired.
-        self.abs_private() < INFINITY
+        self.abs_private() < Self::INFINITY
     }
 
     /// Returns `true` if the number is neither zero, infinite,
diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs
index da22ba8d3c9..b38fd804ee8 100644
--- a/src/libcore/num/f64.rs
+++ b/src/libcore/num/f64.rs
@@ -264,7 +264,7 @@ impl f64 {
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]
     pub fn is_infinite(self) -> bool {
-        self.abs_private() == INFINITY
+        self.abs_private() == Self::INFINITY
     }
 
     /// Returns `true` if this number is neither infinite nor `NaN`.
@@ -286,7 +286,7 @@ impl f64 {
     pub fn is_finite(self) -> bool {
         // There's no need to handle NaN separately: if self is NaN,
         // the comparison is not true, exactly as desired.
-        self.abs_private() < INFINITY
+        self.abs_private() < Self::INFINITY
     }
 
     /// Returns `true` if the number is neither zero, infinite,
diff --git a/src/libcore/num/flt2dec/decoder.rs b/src/libcore/num/flt2dec/decoder.rs
index 2b74effbe2e..c43536c6fcc 100644
--- a/src/libcore/num/flt2dec/decoder.rs
+++ b/src/libcore/num/flt2dec/decoder.rs
@@ -2,7 +2,6 @@
 
 use crate::num::dec2flt::rawfp::RawFloat;
 use crate::num::FpCategory;
-use crate::{f32, f64};
 
 /// Decoded unsigned finite value, such that:
 ///
diff --git a/src/libcore/num/flt2dec/mod.rs b/src/libcore/num/flt2dec/mod.rs
index 9adea94e87d..9bf56e93d89 100644
--- a/src/libcore/num/flt2dec/mod.rs
+++ b/src/libcore/num/flt2dec/mod.rs
@@ -123,7 +123,6 @@ functions.
 )]
 
 pub use self::decoder::{decode, DecodableFloat, Decoded, FullDecoded};
-use crate::i16;
 
 pub mod decoder;
 pub mod estimator;
diff --git a/src/libcore/num/int_macros.rs b/src/libcore/num/int_macros.rs
index b68a09e1131..5035445ba93 100644
--- a/src/libcore/num/int_macros.rs
+++ b/src/libcore/num/int_macros.rs
@@ -14,14 +14,14 @@ macro_rules! int_module {
             concat!("The smallest value that can be represented by this integer type.
 Use [`", stringify!($T), "::MIN", "`](../../std/primitive.", stringify!($T), ".html#associatedconstant.MIN) instead."),
             #[$attr]
-            pub const MIN: $T = $T::min_value();
+            pub const MIN: $T = $T::MIN;
         }
 
         doc_comment! {
             concat!("The largest value that can be represented by this integer type.
 Use [`", stringify!($T), "::MAX", "`](../../std/primitive.", stringify!($T), ".html#associatedconstant.MAX) instead."),
             #[$attr]
-            pub const MAX: $T = $T::max_value();
+            pub const MAX: $T = $T::MAX;
         }
     )
 }
diff --git a/src/libcore/slice/memchr.rs b/src/libcore/slice/memchr.rs
index 2a2169dd348..3b13ed5fed3 100644
--- a/src/libcore/slice/memchr.rs
+++ b/src/libcore/slice/memchr.rs
@@ -34,7 +34,7 @@ fn repeat_byte(b: u8) -> usize {
 #[cfg(not(target_pointer_width = "16"))]
 #[inline]
 fn repeat_byte(b: u8) -> usize {
-    (b as usize) * (crate::usize::MAX / 255)
+    (b as usize) * (usize::MAX / 255)
 }
 
 /// Returns the first index matching the byte `x` in `text`.
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index df976128b5e..dc395bcfba5 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/mod.rs
@@ -28,7 +28,6 @@ use crate::cmp;
 use crate::cmp::Ordering::{self, Equal, Greater, Less};
 use crate::fmt;
 use crate::intrinsics::{assume, exact_div, is_aligned_and_not_null, unchecked_sub};
-use crate::isize;
 use crate::iter::*;
 use crate::marker::{self, Copy, Send, Sized, Sync};
 use crate::mem;
diff --git a/src/libcore/str/pattern.rs b/src/libcore/str/pattern.rs
index 2377536c156..1a2b612b2f9 100644
--- a/src/libcore/str/pattern.rs
+++ b/src/libcore/str/pattern.rs
@@ -46,7 +46,6 @@
 use crate::cmp;
 use crate::fmt;
 use crate::slice::memchr;
-use crate::usize;
 
 // Pattern
 
diff --git a/src/libcore/time.rs b/src/libcore/time.rs
index 924a64847a7..ed1d5d46db5 100644
--- a/src/libcore/time.rs
+++ b/src/libcore/time.rs
@@ -12,9 +12,9 @@
 //! assert_eq!(Duration::new(5, 0), Duration::from_secs(5));
 //! ```
 
+use crate::fmt;
 use crate::iter::Sum;
 use crate::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
-use crate::{fmt, u64};
 
 const NANOS_PER_SEC: u32 = 1_000_000_000;
 const NANOS_PER_MILLI: u32 = 1_000_000;