diff --git a/src/liballoc/alloc.rs b/src/liballoc/alloc.rs index bb88897323e..515de9852d1 100644 --- a/src/liballoc/alloc.rs +++ b/src/liballoc/alloc.rs @@ -229,7 +229,7 @@ pub fn handle_alloc_error(layout: Layout) -> ! { #[cfg(test)] mod tests { extern crate test; - use self::test::Bencher; + use test::Bencher; use crate::{ boxed::Box, alloc::{Global, Alloc, Layout, handle_alloc_error}, diff --git a/src/liballoc/borrow.rs b/src/liballoc/borrow.rs index 8161d588fbd..c1696005373 100644 --- a/src/liballoc/borrow.rs +++ b/src/liballoc/borrow.rs @@ -8,13 +8,13 @@ use core::{ ops::{Add, AddAssign, Deref}, }; -use crate::{fmt, string::String}; - -use self::Cow::*; - #[stable(feature = "rust1", since = "1.0.0")] pub use core::borrow::{Borrow, BorrowMut}; +use crate::{fmt, string::String}; + +use Cow::*; + #[stable(feature = "rust1", since = "1.0.0")] impl<'a, B: ?Sized> Borrow for Cow<'a, B> where B: ToOwned, diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs index b1a5fcbe6b6..d0e35c557a4 100644 --- a/src/liballoc/collections/btree/map.rs +++ b/src/liballoc/collections/btree/map.rs @@ -17,7 +17,8 @@ use super::{ search::{self, SearchResult::*}, }; -use self::{UnderflowResult::*, Entry::*}; +use UnderflowResult::*; +use Entry::*; /// A map based on a B-Tree. /// diff --git a/src/liballoc/collections/btree/search.rs b/src/liballoc/collections/btree/search.rs index 23c41b4dd4c..1645e48cb52 100644 --- a/src/liballoc/collections/btree/search.rs +++ b/src/liballoc/collections/btree/search.rs @@ -5,7 +5,7 @@ use core::{ use super::node::{Handle, NodeRef, marker, ForceResult::*}; -use self::SearchResult::*; +use SearchResult::*; pub enum SearchResult { Found(Handle, marker::KV>), diff --git a/src/liballoc/collections/mod.rs b/src/liballoc/collections/mod.rs index 5f3f8493730..5a33ddc14f0 100644 --- a/src/liballoc/collections/mod.rs +++ b/src/liballoc/collections/mod.rs @@ -23,23 +23,23 @@ pub mod btree_set { #[stable(feature = "rust1", since = "1.0.0")] #[doc(no_inline)] -pub use self::binary_heap::BinaryHeap; +pub use binary_heap::BinaryHeap; #[stable(feature = "rust1", since = "1.0.0")] #[doc(no_inline)] -pub use self::btree_map::BTreeMap; +pub use btree_map::BTreeMap; #[stable(feature = "rust1", since = "1.0.0")] #[doc(no_inline)] -pub use self::btree_set::BTreeSet; +pub use btree_set::BTreeSet; #[stable(feature = "rust1", since = "1.0.0")] #[doc(no_inline)] -pub use self::linked_list::LinkedList; +pub use linked_list::LinkedList; #[stable(feature = "rust1", since = "1.0.0")] #[doc(no_inline)] -pub use self::vec_deque::VecDeque; +pub use vec_deque::VecDeque; use crate::alloc::{AllocErr, LayoutErr}; diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs index 016185791ed..f1839f73634 100644 --- a/src/liballoc/raw_vec.rs +++ b/src/liballoc/raw_vec.rs @@ -624,14 +624,14 @@ enum Fallibility { Infallible, } -use self::Fallibility::*; +use Fallibility::*; enum ReserveStrategy { Exact, Amortized, } -use self::ReserveStrategy::*; +use ReserveStrategy::*; impl RawVec { fn reserve_internal( diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index 5e17396f6d7..9d1197117bb 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -129,12 +129,12 @@ pub use core::slice::{RChunks, RChunksMut, RChunksExact, RChunksExactMut}; // HACK(japaric) needed for the implementation of `vec!` macro during testing // NB see the hack module in this file for more details #[cfg(test)] -pub use self::hack::into_vec; +pub use hack::into_vec; // HACK(japaric) needed for the implementation of `Vec::clone` during testing // NB see the hack module in this file for more details #[cfg(test)] -pub use self::hack::to_vec; +pub use hack::to_vec; // HACK(japaric): With cfg(test) `impl [T]` is not available, these three // functions are actually methods that are in `impl [T]` but not in diff --git a/src/liballoc/task.rs b/src/liballoc/task.rs index 89dc2b10a92..0bf1ff35cc1 100644 --- a/src/liballoc/task.rs +++ b/src/liballoc/task.rs @@ -3,7 +3,7 @@ pub use core::task::*; #[cfg(all(target_has_atomic = "ptr", target_has_atomic = "cas"))] -pub use self::if_arc::*; +pub use if_arc::*; #[cfg(all(target_has_atomic = "ptr", target_has_atomic = "cas"))] mod if_arc { diff --git a/src/liballoc/tests/vec_deque.rs b/src/liballoc/tests/vec_deque.rs index cbc9fefcdff..44183956d8f 100644 --- a/src/liballoc/tests/vec_deque.rs +++ b/src/liballoc/tests/vec_deque.rs @@ -10,8 +10,8 @@ use std::{ use crate::hash; -use self::Taggy::*; -use self::Taggypar::*; +use Taggy::*; +use Taggypar::*; #[test] fn test_simple() {