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/num | |
| 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/num')
| -rw-r--r-- | src/libstd/num/f32.rs | 2 | ||||
| -rw-r--r-- | src/libstd/num/f64.rs | 2 | ||||
| -rw-r--r-- | src/libstd/num/mod.rs | 4 | ||||
| -rw-r--r-- | src/libstd/num/uint_macros.rs | 3 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index 1f76382ce8a..6de49c38b73 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -15,7 +15,7 @@ #![allow(unsigned_negation)] #![doc(primitive = "f32")] -use prelude::*; +use prelude::v1::*; use intrinsics; use libc::c_int; diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index 221ecf62c05..50855d21b4a 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -14,7 +14,7 @@ #![allow(missing_docs)] #![doc(primitive = "f64")] -use prelude::*; +use prelude::v1::*; use intrinsics; use libc::c_int; diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs index 7c8763979bb..01aa21c692b 100644 --- a/src/libstd/num/mod.rs +++ b/src/libstd/num/mod.rs @@ -147,7 +147,7 @@ pub fn test_num<T>(ten: T, two: T) where #[cfg(test)] mod tests { - use prelude::*; + use prelude::v1::*; use super::*; use i8; use i16; @@ -800,7 +800,7 @@ mod bench { extern crate test; use self::test::Bencher; use num::Int; - use prelude::*; + use prelude::v1::*; #[bench] fn bench_pow_function(b: &mut Bencher) { diff --git a/src/libstd/num/uint_macros.rs b/src/libstd/num/uint_macros.rs index c42b7eebfdd..61fd754018e 100644 --- a/src/libstd/num/uint_macros.rs +++ b/src/libstd/num/uint_macros.rs @@ -49,8 +49,9 @@ pub fn to_str_bytes<U, F>(n: $T, radix: uint, f: F) -> U where #[cfg(test)] mod tests { - use prelude::*; + use prelude::v1::*; use num::FromStrRadix; + use str::from_str; #[test] pub fn test_from_str() { |
