mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
liballoc: apply uniform_paths.
This commit is contained in:
parent
3bfa0a35f6
commit
748970dfa9
@ -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},
|
||||
|
@ -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<B> for Cow<'a, B>
|
||||
where B: ToOwned,
|
||||
|
@ -17,7 +17,8 @@ use super::{
|
||||
search::{self, SearchResult::*},
|
||||
};
|
||||
|
||||
use self::{UnderflowResult::*, Entry::*};
|
||||
use UnderflowResult::*;
|
||||
use Entry::*;
|
||||
|
||||
/// A map based on a B-Tree.
|
||||
///
|
||||
|
@ -5,7 +5,7 @@ use core::{
|
||||
|
||||
use super::node::{Handle, NodeRef, marker, ForceResult::*};
|
||||
|
||||
use self::SearchResult::*;
|
||||
use SearchResult::*;
|
||||
|
||||
pub enum SearchResult<BorrowType, K, V, FoundType, GoDownType> {
|
||||
Found(Handle<NodeRef<BorrowType, K, V, FoundType>, marker::KV>),
|
||||
|
@ -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};
|
||||
|
||||
|
@ -624,14 +624,14 @@ enum Fallibility {
|
||||
Infallible,
|
||||
}
|
||||
|
||||
use self::Fallibility::*;
|
||||
use Fallibility::*;
|
||||
|
||||
enum ReserveStrategy {
|
||||
Exact,
|
||||
Amortized,
|
||||
}
|
||||
|
||||
use self::ReserveStrategy::*;
|
||||
use ReserveStrategy::*;
|
||||
|
||||
impl<T, A: Alloc> RawVec<T, A> {
|
||||
fn reserve_internal(
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -10,8 +10,8 @@ use std::{
|
||||
|
||||
use crate::hash;
|
||||
|
||||
use self::Taggy::*;
|
||||
use self::Taggypar::*;
|
||||
use Taggy::*;
|
||||
use Taggypar::*;
|
||||
|
||||
#[test]
|
||||
fn test_simple() {
|
||||
|
Loading…
Reference in New Issue
Block a user