liballoc: apply uniform_paths.

This commit is contained in:
Mazdak Farrokhzad 2019-02-02 11:05:20 +01:00
parent 3bfa0a35f6
commit 748970dfa9
9 changed files with 20 additions and 19 deletions

View File

@ -229,7 +229,7 @@ pub fn handle_alloc_error(layout: Layout) -> ! {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
extern crate test; extern crate test;
use self::test::Bencher; use test::Bencher;
use crate::{ use crate::{
boxed::Box, boxed::Box,
alloc::{Global, Alloc, Layout, handle_alloc_error}, alloc::{Global, Alloc, Layout, handle_alloc_error},

View File

@ -8,13 +8,13 @@ use core::{
ops::{Add, AddAssign, Deref}, ops::{Add, AddAssign, Deref},
}; };
use crate::{fmt, string::String};
use self::Cow::*;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub use core::borrow::{Borrow, BorrowMut}; pub use core::borrow::{Borrow, BorrowMut};
use crate::{fmt, string::String};
use Cow::*;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<'a, B: ?Sized> Borrow<B> for Cow<'a, B> impl<'a, B: ?Sized> Borrow<B> for Cow<'a, B>
where B: ToOwned, where B: ToOwned,

View File

@ -17,7 +17,8 @@ use super::{
search::{self, SearchResult::*}, search::{self, SearchResult::*},
}; };
use self::{UnderflowResult::*, Entry::*}; use UnderflowResult::*;
use Entry::*;
/// A map based on a B-Tree. /// A map based on a B-Tree.
/// ///

View File

@ -5,7 +5,7 @@ use core::{
use super::node::{Handle, NodeRef, marker, ForceResult::*}; use super::node::{Handle, NodeRef, marker, ForceResult::*};
use self::SearchResult::*; use SearchResult::*;
pub enum SearchResult<BorrowType, K, V, FoundType, GoDownType> { pub enum SearchResult<BorrowType, K, V, FoundType, GoDownType> {
Found(Handle<NodeRef<BorrowType, K, V, FoundType>, marker::KV>), Found(Handle<NodeRef<BorrowType, K, V, FoundType>, marker::KV>),

View File

@ -23,23 +23,23 @@ pub mod btree_set {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)] #[doc(no_inline)]
pub use self::binary_heap::BinaryHeap; pub use binary_heap::BinaryHeap;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)] #[doc(no_inline)]
pub use self::btree_map::BTreeMap; pub use btree_map::BTreeMap;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)] #[doc(no_inline)]
pub use self::btree_set::BTreeSet; pub use btree_set::BTreeSet;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)] #[doc(no_inline)]
pub use self::linked_list::LinkedList; pub use linked_list::LinkedList;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)] #[doc(no_inline)]
pub use self::vec_deque::VecDeque; pub use vec_deque::VecDeque;
use crate::alloc::{AllocErr, LayoutErr}; use crate::alloc::{AllocErr, LayoutErr};

View File

@ -624,14 +624,14 @@ enum Fallibility {
Infallible, Infallible,
} }
use self::Fallibility::*; use Fallibility::*;
enum ReserveStrategy { enum ReserveStrategy {
Exact, Exact,
Amortized, Amortized,
} }
use self::ReserveStrategy::*; use ReserveStrategy::*;
impl<T, A: Alloc> RawVec<T, A> { impl<T, A: Alloc> RawVec<T, A> {
fn reserve_internal( fn reserve_internal(

View File

@ -129,12 +129,12 @@ pub use core::slice::{RChunks, RChunksMut, RChunksExact, RChunksExactMut};
// HACK(japaric) needed for the implementation of `vec!` macro during testing // HACK(japaric) needed for the implementation of `vec!` macro during testing
// NB see the hack module in this file for more details // NB see the hack module in this file for more details
#[cfg(test)] #[cfg(test)]
pub use self::hack::into_vec; pub use hack::into_vec;
// HACK(japaric) needed for the implementation of `Vec::clone` during testing // HACK(japaric) needed for the implementation of `Vec::clone` during testing
// NB see the hack module in this file for more details // NB see the hack module in this file for more details
#[cfg(test)] #[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 // HACK(japaric): With cfg(test) `impl [T]` is not available, these three
// functions are actually methods that are in `impl [T]` but not in // functions are actually methods that are in `impl [T]` but not in

View File

@ -3,7 +3,7 @@
pub use core::task::*; pub use core::task::*;
#[cfg(all(target_has_atomic = "ptr", target_has_atomic = "cas"))] #[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"))] #[cfg(all(target_has_atomic = "ptr", target_has_atomic = "cas"))]
mod if_arc { mod if_arc {

View File

@ -10,8 +10,8 @@ use std::{
use crate::hash; use crate::hash;
use self::Taggy::*; use Taggy::*;
use self::Taggypar::*; use Taggypar::*;
#[test] #[test]
fn test_simple() { fn test_simple() {