diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-22 09:04:23 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-02 08:54:06 -0800 |
| commit | 56290a004493a5d2e211f056601533253497df60 (patch) | |
| tree | ab0e7c227f9ba155ea5bfd0390cada43062924c1 /src/libstd/rt | |
| parent | 71b46b18a274edc7f7fb60b490e5ebbb9c911462 (diff) | |
| download | rust-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/rt')
| -rw-r--r-- | src/libstd/rt/args.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rt/backtrace.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rt/exclusive.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/mod.rs | 13 | ||||
| -rw-r--r-- | src/libstd/rt/task.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/unwind.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/util.rs | 5 |
7 files changed, 16 insertions, 16 deletions
diff --git a/src/libstd/rt/args.rs b/src/libstd/rt/args.rs index 98eff621ce0..4734a39c835 100644 --- a/src/libstd/rt/args.rs +++ b/src/libstd/rt/args.rs @@ -44,7 +44,7 @@ pub fn clone() -> Option<Vec<Vec<u8>>> { imp::clone() } target_os = "freebsd", target_os = "dragonfly"))] mod imp { - use prelude::*; + use prelude::v1::*; use mem; use slice; @@ -107,7 +107,7 @@ mod imp { #[cfg(test)] mod tests { - use prelude::*; + use prelude::v1::*; use finally::Finally; use super::*; diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs index 3eeb0ad3968..4abef6ee910 100644 --- a/src/libstd/rt/backtrace.rs +++ b/src/libstd/rt/backtrace.rs @@ -12,7 +12,7 @@ #![allow(non_camel_case_types)] -use prelude::*; +use prelude::v1::*; use os; use sync::atomic; @@ -39,7 +39,7 @@ pub fn log_enabled() -> bool { #[cfg(test)] mod test { - use prelude::*; + use prelude::v1::*; use sys_common; macro_rules! t { ($a:expr, $b:expr) => ({ let mut m = Vec::new(); diff --git a/src/libstd/rt/exclusive.rs b/src/libstd/rt/exclusive.rs index 88bdb29caec..eb6b3655444 100644 --- a/src/libstd/rt/exclusive.rs +++ b/src/libstd/rt/exclusive.rs @@ -83,7 +83,7 @@ impl<'a, T: Send> DerefMut<T> for ExclusiveGuard<'a, T> { #[cfg(test)] mod tests { - use prelude::*; + use prelude::v1::*; use sync::Arc; use super::Exclusive; use task; diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index e877dd5c6aa..68aaa1b3ae5 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -23,14 +23,10 @@ #![allow(dead_code)] -use os; -use thunk::Thunk; use kinds::Send; -use thread::Thread; use ops::FnOnce; use sys; -use sys_common; -use sys_common::thread_info::{mod, NewThread}; +use thunk::Thunk; // Reexport some of our utilities which are expected by other crates. pub use self::util::{default_sched_threads, min_stack, running_on_valgrind}; @@ -65,9 +61,14 @@ const OS_DEFAULT_STACK_ESTIMATE: uint = 2 * (1 << 20); #[cfg(not(test))] #[lang = "start"] fn lang_start(main: *const u8, argc: int, argv: *const *const u8) -> int { + use prelude::v1::*; + use mem; - use prelude::*; + use os; use rt; + use sys_common::thread_info::{mod, NewThread}; + use sys_common; + use thread::Thread; let something_around_the_top_of_the_stack = 1; let addr = &something_around_the_top_of_the_stack as *const int; diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index 41e91d1b6ef..48cdfc20a35 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -496,7 +496,7 @@ impl Death { #[cfg(test)] mod test { use super::*; - use prelude::*; + use prelude::v1::*; use task; use rt::unwind; diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs index e0c512706e6..dcd967a774c 100644 --- a/src/libstd/rt/unwind.rs +++ b/src/libstd/rt/unwind.rs @@ -57,7 +57,7 @@ //! //! Currently Rust uses unwind runtime provided by libgcc. -use prelude::*; +use prelude::v1::*; use any::Any; use cell::Cell; diff --git a/src/libstd/rt/util.rs b/src/libstd/rt/util.rs index fee86e33455..2a8deccb5dc 100644 --- a/src/libstd/rt/util.rs +++ b/src/libstd/rt/util.rs @@ -10,13 +10,12 @@ // // ignore-lexer-test FIXME #15677 -use prelude::*; +use prelude::v1::*; use cmp; use fmt; use intrinsics; -use libc::uintptr_t; -use libc; +use libc::{mod, uintptr_t}; use os; use slice; use str; |
