compiler: remove unnecessary imports and qualified paths
This commit is contained in:
parent
a161a7b654
commit
9bc69925cb
76 changed files with 24 additions and 98 deletions
|
@ -1,6 +1,5 @@
|
|||
use crate::stable_hasher;
|
||||
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
||||
use std::convert::TryInto;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -9,7 +9,6 @@ use crate::fx::FxHashSet;
|
|||
use crate::graph::vec_graph::VecGraph;
|
||||
use crate::graph::{DirectedGraph, GraphSuccessors, WithNumEdges, WithNumNodes, WithSuccessors};
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
use std::cmp::Ord;
|
||||
use std::ops::Range;
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use std::cmp::Ord;
|
||||
|
||||
use crate::graph::{DirectedGraph, GraphSuccessors, WithNumEdges, WithNumNodes, WithSuccessors};
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
|
||||
|
|
|
@ -867,11 +867,9 @@ where
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
use std::borrow::Borrow;
|
||||
use std::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
|
||||
use std::convert::From;
|
||||
use std::cmp::Ordering;
|
||||
use std::fmt::{self, Debug};
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::marker::{Send, Sync};
|
||||
|
||||
impl<O, T: ?Sized> Deref for OwningRef<O, T> {
|
||||
type Target = T;
|
||||
|
@ -1096,7 +1094,6 @@ where
|
|||
// std types integration and convenience type defs
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
use std::boxed::Box;
|
||||
use std::cell::{Ref, RefCell, RefMut};
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
mod owning_ref {
|
||||
use super::super::OwningRef;
|
||||
use super::super::{BoxRef, Erased, ErasedBoxRef, RcRef};
|
||||
use std::cmp::{Ord, Ordering, PartialEq, PartialOrd};
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::hash_map::DefaultHasher;
|
||||
use std::collections::HashMap;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
@ -368,7 +368,7 @@ mod owning_handle {
|
|||
mod owning_ref_mut {
|
||||
use super::super::BoxRef;
|
||||
use super::super::{BoxRefMut, Erased, ErasedBoxRefMut, OwningRefMut};
|
||||
use std::cmp::{Ord, Ordering, PartialEq, PartialOrd};
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::hash_map::DefaultHasher;
|
||||
use std::collections::HashMap;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
|
|
@ -86,7 +86,6 @@ use crate::fx::FxHashMap;
|
|||
|
||||
use std::borrow::Borrow;
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::convert::Into;
|
||||
use std::error::Error;
|
||||
use std::fs;
|
||||
use std::path::Path;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use crate::stable_hasher::{HashStable, StableHasher, StableOrd};
|
||||
use std::borrow::Borrow;
|
||||
use std::cmp::Ordering;
|
||||
use std::iter::FromIterator;
|
||||
use std::mem;
|
||||
use std::ops::{Bound, Index, IndexMut, RangeBounds};
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
//! A variant of `SortedMap` that preserves insertion order.
|
||||
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::iter::FromIterator;
|
||||
|
||||
use crate::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_index::vec::{Idx, IndexVec};
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
use std::fmt;
|
||||
use std::iter::ExactSizeIterator;
|
||||
use std::iter::FusedIterator;
|
||||
use std::iter::Iterator;
|
||||
|
||||
/// Iterator which may contain instance of
|
||||
/// one of two specific implementations.
|
||||
|
|
|
@ -3,7 +3,6 @@ use crate::fx::FxHashMap;
|
|||
use arrayvec::ArrayVec;
|
||||
use std::fmt;
|
||||
use std::hash::Hash;
|
||||
use std::iter::FromIterator;
|
||||
use std::ops::Index;
|
||||
|
||||
// For pointer-sized arguments arrays
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use std::fmt;
|
||||
use std::hash::Hash;
|
||||
use std::iter::FromIterator;
|
||||
|
||||
use super::map::SsoHashMap;
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ cfg_if! {
|
|||
}
|
||||
}
|
||||
|
||||
pub use std::iter::Iterator as ParallelIterator;
|
||||
pub use Iterator as ParallelIterator;
|
||||
|
||||
pub fn par_iter<T: IntoIterator>(t: T) -> T::IntoIter {
|
||||
t.into_iter()
|
||||
|
|
|
@ -76,7 +76,7 @@ where
|
|||
fn drop(&mut self) {
|
||||
// No need to drop the tag, as it's Copy
|
||||
unsafe {
|
||||
std::mem::drop(P::from_usize(self.raw.pointer_raw()));
|
||||
drop(P::from_usize(self.raw.pointer_raw()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use std::borrow::Borrow;
|
||||
use std::fmt::Debug;
|
||||
use std::iter::FromIterator;
|
||||
use std::slice::Iter;
|
||||
use std::vec::IntoIter;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue