about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-22 09:04:23 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-29 08:58:21 -0800
commitc32d03f4172580e3f33e4844ed3c01234dca2d53 (patch)
tree70c57ebe6a3b5f6e8cb4609c918f9455671926be /src/libstd/rt
parent3dcc409fac18a258ba2a8af4345d9566ec8eebad (diff)
downloadrust-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/rt')
-rw-r--r--src/libstd/rt/args.rs4
-rw-r--r--src/libstd/rt/backtrace.rs4
-rw-r--r--src/libstd/rt/exclusive.rs2
-rw-r--r--src/libstd/rt/mod.rs13
-rw-r--r--src/libstd/rt/task.rs2
-rw-r--r--src/libstd/rt/unwind.rs2
-rw-r--r--src/libstd/rt/util.rs5
7 files changed, 16 insertions, 16 deletions
diff --git a/src/libstd/rt/args.rs b/src/libstd/rt/args.rs
index b1f268597c7..1fedf9652a0 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 775e9bb526f..d4101bb2152 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 d64336569c6..eb446edbbd8 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 98940a2b381..a8d5216e202 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 261a8335173..8c35eb58284 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 26dadfd9fb1..d6c0e4a5aea 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;