Skip to content

Commit

Permalink
Stop accessing module level int consts via crate::<Ty>
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Apr 20, 2020
1 parent 8ce3f84 commit 9fc0833
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/libcore/iter/adapters/mod.rs
Expand Up @@ -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};
Expand Down
1 change: 0 additions & 1 deletion 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};

Expand Down
1 change: 0 additions & 1 deletion src/libcore/iter/sources.rs
@@ -1,6 +1,5 @@
use crate::fmt;
use crate::marker;
use crate::usize;

use super::{FusedIterator, TrustedLen};

Expand Down
1 change: 0 additions & 1 deletion src/libcore/num/flt2dec/mod.rs
Expand Up @@ -123,7 +123,6 @@ functions.
)]

pub use self::decoder::{decode, DecodableFloat, Decoded, FullDecoded};
use crate::i16;

pub mod decoder;
pub mod estimator;
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/slice/memchr.rs
Expand Up @@ -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`.
Expand Down
1 change: 0 additions & 1 deletion src/libcore/slice/mod.rs
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/libcore/str/pattern.rs
Expand Up @@ -12,7 +12,6 @@
use crate::cmp;
use crate::fmt;
use crate::slice::memchr;
use crate::usize;

// Pattern

Expand Down
2 changes: 1 addition & 1 deletion src/libcore/time.rs
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/thread/mod.rs
Expand Up @@ -1062,7 +1062,7 @@ impl ThreadId {

// If we somehow use up all our bits, panic so that we're not
// covering up subtle bugs of IDs being reused.
if COUNTER == crate::u64::MAX {
if COUNTER == u64::MAX {
panic!("failed to generate unique thread ID: bitspace exhausted");
}

Expand Down

0 comments on commit 9fc0833

Please sign in to comment.