Skip to content

Commit fcf4599

Browse files
committed
Stop importing int/float modules in librustc_*
1 parent a88b36b commit fcf4599

File tree

17 files changed

+4
-18
lines changed

17 files changed

+4
-18
lines changed

src/librustc_ast/util/comments.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use rustc_span::source_map::SourceMap;
55
use rustc_span::{BytePos, CharPos, FileName, Pos};
66

77
use log::debug;
8-
use std::usize;
98

109
#[cfg(test)]
1110
mod tests;

src/librustc_codegen_llvm/intrinsic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use rustc_span::Span;
2525
use rustc_target::abi::{self, HasDataLayout, LayoutOf, Primitive};
2626

2727
use std::cmp::Ordering;
28-
use std::{i128, iter, u128};
28+
use std::iter;
2929

3030
fn get_simple_intrinsic(cx: &CodegenCx<'ll, '_>, name: &str) -> Option<&'ll Value> {
3131
let llvm_name = match name {

src/librustc_codegen_ssa/mir/rvalue.rs

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ use rustc_span::source_map::{Span, DUMMY_SP};
1717
use rustc_span::symbol::sym;
1818
use rustc_target::abi::{Abi, Int, LayoutOf, Variants};
1919

20-
use std::{i128, u128};
21-
2220
impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
2321
pub fn codegen_rvalue(
2422
&mut self,

src/librustc_data_structures/graph/implementation/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use crate::snapshot_vec::{SnapshotVec, SnapshotVecDelegate};
2424
use rustc_index::bit_set::BitSet;
2525
use std::fmt::Debug;
26-
use std::usize;
2726

2827
#[cfg(test)]
2928
mod tests;

src/librustc_data_structures/profiling.rs

-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ use std::path::Path;
9393
use std::process;
9494
use std::sync::Arc;
9595
use std::time::{Duration, Instant};
96-
use std::u32;
9796

9897
use measureme::{EventId, EventIdBuilder, SerializableString, StringId};
9998
use parking_lot::RwLock;

src/librustc_index/vec.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use std::iter::{self, FromIterator};
77
use std::marker::PhantomData;
88
use std::ops::{Index, IndexMut, Range, RangeBounds};
99
use std::slice;
10-
use std::u32;
1110
use std::vec;
1211

1312
/// Represents some newtyped `usize` wrapper.

src/librustc_infer/infer/type_variable.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use rustc_data_structures::unify as ut;
88
use std::cmp;
99
use std::marker::PhantomData;
1010
use std::ops::Range;
11-
use std::u32;
1211

1312
pub struct TypeVariableTable<'tcx> {
1413
values: sv::SnapshotVec<Delegate>,

src/librustc_lint/types.rs

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use rustc_target::spec::abi::Abi;
2121

2222
use log::debug;
2323
use std::cmp;
24-
use std::{f32, f64, i16, i32, i64, i8, u16, u32, u64, u8};
2524

2625
declare_lint! {
2726
UNUSED_COMPARISONS,

src/librustc_metadata/rmeta/decoder.rs

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ use std::io;
4242
use std::mem;
4343
use std::num::NonZeroUsize;
4444
use std::path::Path;
45-
use std::u32;
4645

4746
pub use cstore_impl::{provide, provide_extern};
4847

src/librustc_metadata/rmeta/encoder.rs

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ use rustc_target::abi::VariantIdx;
3939
use std::hash::Hash;
4040
use std::num::NonZeroUsize;
4141
use std::path::Path;
42-
use std::u32;
4342

4443
struct EncodeContext<'tcx> {
4544
opaque: opaque::Encoder,

src/librustc_middle/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use std::borrow::Cow;
3333
use std::fmt::{self, Debug, Display, Formatter, Write};
3434
use std::ops::Index;
3535
use std::slice;
36-
use std::{iter, mem, option, u32};
36+
use std::{iter, mem, option};
3737

3838
pub use self::cache::{BodyAndCache, ReadOnlyBodyAndCache};
3939
pub use self::query::*;

src/librustc_mir/transform/promote_consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use rustc_index::vec::{Idx, IndexVec};
2727
use rustc_target::spec::abi::Abi;
2828

2929
use std::cell::Cell;
30-
use std::{cmp, iter, mem, usize};
30+
use std::{cmp, iter, mem};
3131

3232
use crate::const_eval::{is_const_fn, is_unstable_const_fn};
3333
use crate::transform::check_consts::{is_lang_panic_fn, qualifs, ConstKind, Item};

src/librustc_mir_build/build/matches/util.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use rustc_middle::mir::*;
55
use rustc_middle::ty;
66
use smallvec::SmallVec;
77
use std::convert::TryInto;
8-
use std::u32;
98

109
impl<'a, 'tcx> Builder<'a, 'tcx> {
1110
crate fn field_match_pairs<'pat>(

src/librustc_mir_build/build/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use rustc_span::symbol::kw;
1717
use rustc_span::Span;
1818
use rustc_target::spec::abi::Abi;
1919
use rustc_target::spec::PanicStrategy;
20-
use std::u32;
2120

2221
use super::lints;
2322

src/librustc_mir_build/hair/pattern/_match.rs

-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ use std::convert::TryInto;
256256
use std::fmt;
257257
use std::iter::{FromIterator, IntoIterator};
258258
use std::ops::RangeInclusive;
259-
use std::u128;
260259

261260
crate fn expand_pattern<'a, 'tcx>(cx: &MatchCheckCtxt<'a, 'tcx>, pat: Pat<'tcx>) -> Pat<'tcx> {
262261
LiteralExpander { tcx: cx.tcx, param_env: cx.param_env }.fold_pattern(&pat)

src/librustc_passes/liveness.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ use rustc_span::symbol::sym;
112112
use rustc_span::Span;
113113

114114
use std::collections::VecDeque;
115+
use std::fmt;
115116
use std::io;
116117
use std::io::prelude::*;
117118
use std::rc::Rc;
118-
use std::{fmt, u32};
119119

120120
#[derive(Copy, Clone, PartialEq)]
121121
struct Variable(u32);

src/librustc_span/def_id.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use rustc_macros::HashStable_Generic;
77
use rustc_serialize::{Decoder, Encoder};
88
use std::borrow::Borrow;
99
use std::fmt;
10-
use std::{u32, u64};
1110

1211
rustc_index::newtype_index! {
1312
pub struct CrateId {

0 commit comments

Comments
 (0)