diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-22 09:04:23 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-29 08:58:21 -0800 |
| commit | c32d03f4172580e3f33e4844ed3c01234dca2d53 (patch) | |
| tree | 70c57ebe6a3b5f6e8cb4609c918f9455671926be /src/libstd/sys/common | |
| parent | 3dcc409fac18a258ba2a8af4345d9566ec8eebad (diff) | |
| download | rust-c32d03f4172580e3f33e4844ed3c01234dca2d53.tar.gz rust-c32d03f4172580e3f33e4844ed3c01234dca2d53.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.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/common/helper_thread.rs | 5 | ||||
| -rw-r--r-- | src/libstd/sys/common/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/common/net.rs | 12 | ||||
| -rw-r--r-- | src/libstd/sys/common/thread_local.rs | 4 |
5 files changed, 13 insertions, 12 deletions
diff --git a/src/libstd/sys/common/backtrace.rs b/src/libstd/sys/common/backtrace.rs index 1d646eb06b1..c1aace764fc 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 a629f035b07..5d94e8efeb8 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 382f6875b28..9ab5077ae79 100644 --- a/src/libstd/sys/common/net.rs +++ b/src/libstd/sys/common/net.rs @@ -8,23 +8,23 @@ // 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 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>() {} |
