Skip to content

Commit 6671096

Browse files
Remove redundant imports
1 parent 6ea1888 commit 6671096

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
@@ -778,7 +778,6 @@ impl<'enc, 'a, 'tcx, E> CacheEncoder<'enc, 'a, 'tcx, E>
778778
value: &V)
779779
-> Result<(), E::Error>
780780
{
781-
use crate::ty::codec::TyEncoder;
782781
let start_pos = self.position();
783782

784783
tag.encode(self)?;

src/librustc_codegen_llvm/context.rs

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

src/librustc_codegen_ssa/mir/rvalue.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,6 @@ fn cast_int_to_float<'a, 'tcx: 'a, Bx: BuilderMethods<'a, 'tcx>>(
750750
// All inputs greater or equal to (f32::MAX + 0.5 ULP) are rounded to infinity,
751751
// and for everything else LLVM's uitofp works just fine.
752752
use rustc_apfloat::ieee::Single;
753-
use rustc_apfloat::Float;
754753
const MAX_F32_PLUS_HALF_ULP: u128 = ((1 << (Single::PRECISION + 1)) - 1)
755754
<< (Single::MAX_EXP - Single::PRECISION as i16);
756755
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
@@ -156,7 +156,7 @@ impl CodeSuggestion {
156156
/// Returns the assembled code suggestions and whether they should be shown with an underline.
157157
pub fn splice_lines(&self, cm: &SourceMapperDyn)
158158
-> Vec<(String, Vec<SubstitutionPart>)> {
159-
use syntax_pos::{CharPos, Loc, Pos};
159+
use syntax_pos::{CharPos, Pos};
160160

161161
fn push_trailing(buf: &mut String,
162162
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
@@ -61,7 +61,6 @@ fn total_duration(traces: &[trace::Rec]) -> Duration {
6161
fn profile_queries_thread(r: Receiver<ProfileQueriesMsg>) {
6262
use self::trace::*;
6363
use std::fs::File;
64-
use std::time::{Instant};
6564

6665
let mut profq_msgs: Vec<ProfileQueriesMsg> = vec![];
6766
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>> EvalContext<'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
@@ -1733,7 +1733,6 @@ impl<'a> Resolver<'a> {
17331733
/// just that an error occurred.
17341734
pub fn resolve_str_path_error(&mut self, span: Span, path_str: &str, is_value: bool)
17351735
-> Result<hir::Path, ()> {
1736-
use std::iter;
17371736
let mut errored = false;
17381737

17391738
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
@@ -190,7 +190,7 @@ crate fn environment<'a, 'tcx>(
190190
tcx: TyCtxt<'a, 'tcx, 'tcx>,
191191
def_id: DefId
192192
) -> Environment<'tcx> {
193-
use super::{Lower, IntoFromEnvGoal};
193+
use super::IntoFromEnvGoal;
194194
use rustc::hir::{Node, TraitItemKind, ImplItemKind, ItemKind, ForeignItemKind};
195195

196196
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);
@@ -1016,8 +1013,6 @@ fn check_false_global_bounds<'a, 'gcx, 'tcx>(
10161013
span: Span,
10171014
id: hir::HirId)
10181015
{
1019-
use rustc::ty::TypeFoldable;
1020-
10211016
let empty_env = ty::ParamEnv::empty();
10221017

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

0 commit comments

Comments
 (0)