Skip to content

Commit

Permalink
auto merge of #12075 : chromatic/rust/gh_11983_deglob_std, r=alexcric…
Browse files Browse the repository at this point in the history
…hton

This replaces the imports from the prelude with the re-exported symbols.
  • Loading branch information
bors committed Feb 7, 2014
2 parents c3ccaac + b91b6a7 commit ca40da8
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/libstd/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

//! Operations on ASCII strings and characters

use to_str::{ToStr,IntoStr};
use to_str::{ToStr, IntoStr};
use str;
use str::Str;
use str::StrSlice;
Expand Down
5 changes: 4 additions & 1 deletion src/libstd/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

//! Types dealing with dynamic mutability

use prelude::*;
use clone::{Clone, DeepClone};
use cmp::Eq;
use ops::Drop;
use option::{None, Option, Some};
use cast;
use kinds::{marker, Pod};

Expand Down
4 changes: 3 additions & 1 deletion src/libstd/local_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ local_data::get(key_vector, |opt| assert_eq!(*opt.unwrap(), ~[4]));
// magic.

use cast;
use prelude::*;
use option::{None, Option, Some};
use vec::{ImmutableVector, MutableVector, OwnedVector};
use iter::{Iterator};
use rt::task::{Task, LocalStorage};
use util::replace;

Expand Down
22 changes: 18 additions & 4 deletions src/libstd/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,31 @@

#[allow(missing_doc)];

use clone::Clone;
use container::Container;
#[cfg(target_os = "macos")]
#[cfg(windows)]
use iter::range;

use clone::Clone;
use container::Container;
use libc;
use libc::{c_char, c_void, c_int};
use option::{Some, None};
use option::{Some, None, Option};
use os;
use prelude::*;
use ops::Drop;
use result::{Err, Ok, Result};
use ptr;
use str;
use str::{Str, StrSlice};
use fmt;
use unstable::finally::Finally;
use sync::atomics::{AtomicInt, INIT_ATOMIC_INT, SeqCst};
use path::{Path, GenericPath};
use iter::Iterator;
use vec::{Vector, CloneableVector, ImmutableVector, MutableVector, OwnedVector};
use ptr::RawPtr;

#[cfg(unix)]
use c_str::ToCStr;

/// Delegates to the libc close() function, returning the same return value.
pub fn close(fd: int) -> int {
Expand Down Expand Up @@ -396,6 +407,8 @@ pub fn self_exe_name() -> Option<Path> {

#[cfg(windows)]
fn load_self() -> Option<~[u8]> {
use str::OwnedStr;

unsafe {
use os::win32::fill_utf16_buf_and_decode;
fill_utf16_buf_and_decode(|buf, sz| {
Expand Down Expand Up @@ -967,6 +980,7 @@ impl MemoryMap {
/// `ErrZeroLength`.
pub fn new(min_len: uint, options: &[MapOption]) -> Result<MemoryMap, MapError> {
use libc::off_t;
use cmp::Equiv;

if min_len == 0 {
return Err(ErrZeroLength)
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//! Utilities for references

#[cfg(not(test))]
use prelude::*;
use cmp::{Eq, Ord, Ordering, TotalEq, TotalOrd};

// Equality for region pointers
#[cfg(not(test))]
Expand Down
8 changes: 7 additions & 1 deletion src/libstd/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ use io::process;
use io;
use libc::{pid_t, c_int};
use libc;
use prelude::*;
use option::{None, Option, Some};
use task::spawn;
use path::{Path, GenericPath};
use result::Ok;
use str::Str;
use vec::Vector;
use clone::Clone;

/**
* A value representing a child process.
Expand Down
6 changes: 5 additions & 1 deletion src/libstd/trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@

//! Ordered containers with integer keys, implemented as radix tries (`TrieSet` and `TrieMap` types)

use prelude::*;
use option::{None, Option, Some};
use container::{Container, Map, Mutable, MutableMap};
use iter::{Extendable, FromIterator, Iterator};
use mem;
use uint;
use util::replace;
use unstable::intrinsics::init;
use vec;
use ptr::RawPtr;
use vec::{ImmutableVector, Items, MutableVector, MutItems, OwnedVector};

// FIXME: #5244: need to manually update the TrieNode constructor
static SHIFT: uint = 4;
Expand Down
3 changes: 2 additions & 1 deletion src/libstd/unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
//! Functions for the unit type.

#[cfg(not(test))]
use prelude::*;
use default::Default;
use cmp::{Eq, Equal, Ord, Ordering, TotalEq, TotalOrd};

#[cfg(not(test))]
impl Eq for () {
Expand Down
8 changes: 6 additions & 2 deletions src/libstd/vec_ng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@
// Migrate documentation over from `std::vec` when it is removed.
#[doc(hidden)];

use prelude::*;
use ops::Drop;
use option::{None, Option, Some};
use clone::Clone;
use iter::{DoubleEndedIterator, Iterator};
use num::CheckedMul;
use container::Container;
use mem::size_of;
use cast::{forget, transmute};
use rt::global_heap::{malloc_raw, realloc_raw};
use vec::Items;
use vec::{ImmutableVector, Items, MutableVector};
use unstable::raw::Slice;
use ptr::{offset, read_ptr};
use libc::{free, c_void};
Expand Down

0 comments on commit ca40da8

Please sign in to comment.