Skip to content

Commit 541c499

Browse files
Remove redundant imports
1 parent 29d68ed commit 541c499

File tree

10 files changed

+2
-15
lines changed

10 files changed

+2
-15
lines changed

src/librustc/ty/query/on_disk_cache.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,6 @@ impl<'enc, 'a, 'tcx, E> CacheEncoder<'enc, 'a, 'tcx, E>
777777
value: &V)
778778
-> Result<(), E::Error>
779779
{
780-
use crate::ty::codec::TyEncoder;
781780
let start_pos = self.position();
782781

783782
tag.encode(self)?;

src/librustc_codegen_llvm/context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
372372
// Returns a Value of the "eh_unwind_resume" lang item if one is defined,
373373
// otherwise declares it as an external function.
374374
fn eh_unwind_resume(&self) -> &'ll Value {
375-
use crate::attributes;
376375
let unwresume = &self.eh_unwind_resume;
377376
if let Some(llfn) = unwresume.get() {
378377
return llfn;

src/librustc_codegen_ssa/mir/rvalue.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,6 @@ fn cast_int_to_float<'a, 'tcx: 'a, Bx: BuilderMethods<'a, 'tcx>>(
732732
// All inputs greater or equal to (f32::MAX + 0.5 ULP) are rounded to infinity,
733733
// and for everything else LLVM's uitofp works just fine.
734734
use rustc_apfloat::ieee::Single;
735-
use rustc_apfloat::Float;
736735
const MAX_F32_PLUS_HALF_ULP: u128 = ((1 << (Single::PRECISION + 1)) - 1)
737736
<< (Single::MAX_EXP - Single::PRECISION as i16);
738737
let max = bx.cx().const_uint_big(int_ty, MAX_F32_PLUS_HALF_ULP);

src/librustc_errors/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ impl CodeSuggestion {
155155
/// Returns the assembled code suggestions and whether they should be shown with an underline.
156156
pub fn splice_lines(&self, cm: &SourceMapperDyn)
157157
-> Vec<(String, Vec<SubstitutionPart>)> {
158-
use syntax_pos::{CharPos, Loc, Pos};
158+
use syntax_pos::{CharPos, Pos};
159159

160160
fn push_trailing(buf: &mut String,
161161
line_opt: Option<&Cow<'_, str>>,

src/librustc_interface/profile/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ fn total_duration(traces: &[trace::Rec]) -> Duration {
6262
fn profile_queries_thread(r: Receiver<ProfileQueriesMsg>) {
6363
use self::trace::*;
6464
use std::fs::File;
65-
use std::time::{Instant};
6665

6766
let mut profq_msgs: Vec<ProfileQueriesMsg> = vec![];
6867
let mut frame: StackFrame = StackFrame { parse_st: ParseState::Clear, traces: vec![] };

src/librustc_mir/hair/pattern/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,6 @@ impl<'a, 'tcx> PatternContext<'a, 'tcx> {
427427

428428
let mut kind = match (lo, hi) {
429429
(PatternKind::Constant { value: lo }, PatternKind::Constant { value: hi }) => {
430-
use std::cmp::Ordering;
431430
let cmp = compare_const_vals(
432431
self.tcx,
433432
lo,

src/librustc_mir/interpret/operator.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,6 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M>
331331
val: ImmTy<'tcx, M::PointerTag>,
332332
) -> EvalResult<'tcx, Scalar<M::PointerTag>> {
333333
use rustc::mir::UnOp::*;
334-
use rustc_apfloat::ieee::{Single, Double};
335-
use rustc_apfloat::Float;
336334

337335
let layout = val.layout;
338336
let val = val.to_scalar()?;

src/librustc_resolve/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1738,7 +1738,6 @@ impl<'a> Resolver<'a> {
17381738
/// just that an error occurred.
17391739
pub fn resolve_str_path_error(&mut self, span: Span, path_str: &str, is_value: bool)
17401740
-> Result<hir::Path, ()> {
1741-
use std::iter;
17421741
let mut errored = false;
17431742

17441743
let path = if path_str.starts_with("::") {

src/librustc_traits/lowering/environment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ crate fn environment<'a, 'tcx>(
164164
tcx: TyCtxt<'a, 'tcx, 'tcx>,
165165
def_id: DefId
166166
) -> Environment<'tcx> {
167-
use super::{Lower, IntoFromEnvGoal};
167+
use super::IntoFromEnvGoal;
168168
use rustc::hir::{Node, TraitItemKind, ImplItemKind, ItemKind, ForeignItemKind};
169169

170170
debug!("environment(def_id = {:?})", def_id);

src/librustc_typeck/check/wfcheck.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,6 @@ fn check_where_clauses<'a, 'gcx, 'fcx, 'tcx>(
420420
def_id: DefId,
421421
return_ty: Option<Ty<'tcx>>,
422422
) {
423-
use ty::subst::Subst;
424-
use rustc::ty::TypeFoldable;
425-
426423
let predicates = fcx.tcx.predicates_of(def_id);
427424

428425
let generics = tcx.generics_of(def_id);
@@ -1010,8 +1007,6 @@ fn check_false_global_bounds<'a, 'gcx, 'tcx>(
10101007
span: Span,
10111008
id: hir::HirId)
10121009
{
1013-
use rustc::ty::TypeFoldable;
1014-
10151010
let empty_env = ty::ParamEnv::empty();
10161011

10171012
let def_id = fcx.tcx.hir().local_def_id_from_hir_id(id);

0 commit comments

Comments
 (0)