summary refs log tree commit diff
path: root/src/libstd/sys/common
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-22 09:04:23 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-02 08:54:06 -0800
commit56290a004493a5d2e211f056601533253497df60 (patch)
treeab0e7c227f9ba155ea5bfd0390cada43062924c1 /src/libstd/sys/common
parent71b46b18a274edc7f7fb60b490e5ebbb9c911462 (diff)
downloadrust-56290a004493a5d2e211f056601533253497df60.tar.gz
rust-56290a004493a5d2e211f056601533253497df60.zip
std: Stabilize the prelude module
This commit is an implementation of [RFC 503][rfc] which is a stabilization
story for the prelude. Most of the RFC was directly applied, removing reexports.
Some reexports are kept around, however:

* `range` remains until range syntax has landed to reduce churn.
* `Path` and `GenericPath` remain until path reform lands. This is done to
  prevent many imports of `GenericPath` which will soon be removed.
* All `io` traits remain until I/O reform lands so imports can be rewritten all
  at once to `std::io::prelude::*`.

This is a breaking change because many prelude reexports have been removed, and
the RFC can be consulted for the exact list of removed reexports, as well as to
find the locations of where to import them.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md
[breaking-change]

Closes #20068
Diffstat (limited to 'src/libstd/sys/common')
-rw-r--r--src/libstd/sys/common/backtrace.rs2
-rw-r--r--src/libstd/sys/common/helper_thread.rs5
-rw-r--r--src/libstd/sys/common/mod.rs2
-rw-r--r--src/libstd/sys/common/net.rs12
-rw-r--r--src/libstd/sys/common/thread_local.rs4
5 files changed, 13 insertions, 12 deletions
diff --git a/src/libstd/sys/common/backtrace.rs b/src/libstd/sys/common/backtrace.rs
index 866bf1d8a7d..d4039fd96ff 100644
--- a/src/libstd/sys/common/backtrace.rs
+++ b/src/libstd/sys/common/backtrace.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use prelude::*;
+use prelude::v1::*;
 
 use io::IoResult;
 
diff --git a/src/libstd/sys/common/helper_thread.rs b/src/libstd/sys/common/helper_thread.rs
index 9ef1c33312f..c4c093dcb32 100644
--- a/src/libstd/sys/common/helper_thread.rs
+++ b/src/libstd/sys/common/helper_thread.rs
@@ -20,12 +20,13 @@
 //! can be created in the future and there must be no active timers at that
 //! time.
 
-use prelude::*;
+use prelude::v1::*;
 
 use cell::UnsafeCell;
+use comm::{channel, Sender, Receiver};
 use mem;
-use sync::{StaticMutex, StaticCondvar};
 use rt;
+use sync::{StaticMutex, StaticCondvar};
 use sys::helper_signal;
 
 use thread::Thread;
diff --git a/src/libstd/sys/common/mod.rs b/src/libstd/sys/common/mod.rs
index dc0ad08cdbe..97015f74a4a 100644
--- a/src/libstd/sys/common/mod.rs
+++ b/src/libstd/sys/common/mod.rs
@@ -12,7 +12,7 @@
 #![allow(dead_code)]
 
 use io::{mod, IoError, IoResult};
-use prelude::*;
+use prelude::v1::*;
 use sys::{last_error, retry};
 use c_str::CString;
 use num::Int;
diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs
index 259c15b5f06..cb0c5581abd 100644
--- a/src/libstd/sys/common/net.rs
+++ b/src/libstd/sys/common/net.rs
@@ -8,24 +8,24 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use prelude::v1::*;
 use self::SocketStatus::*;
 use self::InAddr::*;
 
-use alloc::arc::Arc;
+use c_str::ToCStr;
+use io::net::addrinfo;
+use io::net::ip::{SocketAddr, IpAddr, Ipv4Addr, Ipv6Addr};
+use io::{IoResult, IoError};
 use libc::{mod, c_char, c_int};
 use c_str::CString;
 use mem;
 use num::Int;
 use ptr::{mod, null, null_mut};
-use io::net::ip::{SocketAddr, IpAddr, Ipv4Addr, Ipv6Addr};
-use io::net::addrinfo;
-use io::{IoResult, IoError};
 use sys::{mod, retry, c, sock_t, last_error, last_net_error, last_gai_error, close_sock,
           wrlen, msglen_t, os, wouldblock, set_nonblocking, timer, ms_to_timeval,
           decode_error_detailed};
-use sync::{Mutex, MutexGuard};
+use sync::{Arc, Mutex, MutexGuard};
 use sys_common::{mod, keep_going, short_write, timeout};
-use prelude::*;
 use cmp;
 use io;
 
diff --git a/src/libstd/sys/common/thread_local.rs b/src/libstd/sys/common/thread_local.rs
index fe7a7d8d037..405dd4eacf3 100644
--- a/src/libstd/sys/common/thread_local.rs
+++ b/src/libstd/sys/common/thread_local.rs
@@ -56,7 +56,7 @@
 
 #![allow(non_camel_case_types)]
 
-use prelude::*;
+use prelude::v1::*;
 
 use sync::atomic::{mod, AtomicUint};
 use sync::{Mutex, Once, ONCE_INIT};
@@ -246,7 +246,7 @@ impl Drop for Key {
 
 #[cfg(test)]
 mod tests {
-    use prelude::*;
+    use prelude::v1::*;
     use super::{Key, StaticKey, INIT_INNER};
 
     fn assert_sync<T: Sync>() {}