Stop importing int/float modules in librustc_*
This commit is contained in:
parent
a88b36b93b
commit
fcf45999f7
17 changed files with 4 additions and 18 deletions
|
|
@ -5,7 +5,6 @@ use rustc_span::source_map::SourceMap;
|
|||
use rustc_span::{BytePos, CharPos, FileName, Pos};
|
||||
|
||||
use log::debug;
|
||||
use std::usize;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use rustc_span::Span;
|
|||
use rustc_target::abi::{self, HasDataLayout, LayoutOf, Primitive};
|
||||
|
||||
use std::cmp::Ordering;
|
||||
use std::{i128, iter, u128};
|
||||
use std::iter;
|
||||
|
||||
fn get_simple_intrinsic(cx: &CodegenCx<'ll, '_>, name: &str) -> Option<&'ll Value> {
|
||||
let llvm_name = match name {
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ use rustc_span::source_map::{Span, DUMMY_SP};
|
|||
use rustc_span::symbol::sym;
|
||||
use rustc_target::abi::{Abi, Int, LayoutOf, Variants};
|
||||
|
||||
use std::{i128, u128};
|
||||
|
||||
impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
||||
pub fn codegen_rvalue(
|
||||
&mut self,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
use crate::snapshot_vec::{SnapshotVec, SnapshotVecDelegate};
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use std::fmt::Debug;
|
||||
use std::usize;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@ use std::path::Path;
|
|||
use std::process;
|
||||
use std::sync::Arc;
|
||||
use std::time::{Duration, Instant};
|
||||
use std::u32;
|
||||
|
||||
use measureme::{EventId, EventIdBuilder, SerializableString, StringId};
|
||||
use parking_lot::RwLock;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use std::iter::{self, FromIterator};
|
|||
use std::marker::PhantomData;
|
||||
use std::ops::{Index, IndexMut, Range, RangeBounds};
|
||||
use std::slice;
|
||||
use std::u32;
|
||||
use std::vec;
|
||||
|
||||
/// Represents some newtyped `usize` wrapper.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ use rustc_data_structures::unify as ut;
|
|||
use std::cmp;
|
||||
use std::marker::PhantomData;
|
||||
use std::ops::Range;
|
||||
use std::u32;
|
||||
|
||||
pub struct TypeVariableTable<'tcx> {
|
||||
values: sv::SnapshotVec<Delegate>,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ use rustc_target::spec::abi::Abi;
|
|||
|
||||
use log::debug;
|
||||
use std::cmp;
|
||||
use std::{f32, f64, i16, i32, i64, i8, u16, u32, u64, u8};
|
||||
|
||||
declare_lint! {
|
||||
UNUSED_COMPARISONS,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ use std::io;
|
|||
use std::mem;
|
||||
use std::num::NonZeroUsize;
|
||||
use std::path::Path;
|
||||
use std::u32;
|
||||
|
||||
pub use cstore_impl::{provide, provide_extern};
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ use rustc_target::abi::VariantIdx;
|
|||
use std::hash::Hash;
|
||||
use std::num::NonZeroUsize;
|
||||
use std::path::Path;
|
||||
use std::u32;
|
||||
|
||||
struct EncodeContext<'tcx> {
|
||||
opaque: opaque::Encoder,
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ use std::borrow::Cow;
|
|||
use std::fmt::{self, Debug, Display, Formatter, Write};
|
||||
use std::ops::Index;
|
||||
use std::slice;
|
||||
use std::{iter, mem, option, u32};
|
||||
use std::{iter, mem, option};
|
||||
|
||||
pub use self::cache::{BodyAndCache, ReadOnlyBodyAndCache};
|
||||
pub use self::query::*;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ use rustc_index::vec::{Idx, IndexVec};
|
|||
use rustc_target::spec::abi::Abi;
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::{cmp, iter, mem, usize};
|
||||
use std::{cmp, iter, mem};
|
||||
|
||||
use crate::const_eval::{is_const_fn, is_unstable_const_fn};
|
||||
use crate::transform::check_consts::{is_lang_panic_fn, qualifs, ConstKind, Item};
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ use rustc_middle::mir::*;
|
|||
use rustc_middle::ty;
|
||||
use smallvec::SmallVec;
|
||||
use std::convert::TryInto;
|
||||
use std::u32;
|
||||
|
||||
impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||
crate fn field_match_pairs<'pat>(
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ use rustc_span::symbol::kw;
|
|||
use rustc_span::Span;
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use rustc_target::spec::PanicStrategy;
|
||||
use std::u32;
|
||||
|
||||
use super::lints;
|
||||
|
||||
|
|
|
|||
|
|
@ -256,7 +256,6 @@ use std::convert::TryInto;
|
|||
use std::fmt;
|
||||
use std::iter::{FromIterator, IntoIterator};
|
||||
use std::ops::RangeInclusive;
|
||||
use std::u128;
|
||||
|
||||
crate fn expand_pattern<'a, 'tcx>(cx: &MatchCheckCtxt<'a, 'tcx>, pat: Pat<'tcx>) -> Pat<'tcx> {
|
||||
LiteralExpander { tcx: cx.tcx, param_env: cx.param_env }.fold_pattern(&pat)
|
||||
|
|
|
|||
|
|
@ -112,10 +112,10 @@ use rustc_span::symbol::sym;
|
|||
use rustc_span::Span;
|
||||
|
||||
use std::collections::VecDeque;
|
||||
use std::fmt;
|
||||
use std::io;
|
||||
use std::io::prelude::*;
|
||||
use std::rc::Rc;
|
||||
use std::{fmt, u32};
|
||||
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
struct Variable(u32);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use rustc_macros::HashStable_Generic;
|
|||
use rustc_serialize::{Decoder, Encoder};
|
||||
use std::borrow::Borrow;
|
||||
use std::fmt;
|
||||
use std::{u32, u64};
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
pub struct CrateId {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue