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/collections | |
| 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/collections')
| -rw-r--r-- | src/libstd/collections/hash/bench.rs | 2 | ||||
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 5 | ||||
| -rw-r--r-- | src/libstd/collections/hash/set.rs | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/libstd/collections/hash/bench.rs b/src/libstd/collections/hash/bench.rs index 87aebb24f98..28689767cb0 100644 --- a/src/libstd/collections/hash/bench.rs +++ b/src/libstd/collections/hash/bench.rs @@ -11,7 +11,7 @@ #![cfg(test)] extern crate test; -use prelude::*; +use prelude::v1::*; use self::test::Bencher; use iter::{range_inclusive}; diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index d749cd77cef..e7918d605cb 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -87,7 +87,7 @@ impl DefaultResizePolicy { #[test] fn test_resize_policy() { - use prelude::*; + use prelude::v1::*; let rp = DefaultResizePolicy; for n in range(0u, 1000) { assert!(rp.min_capacity(rp.usable_capacity(n)) <= n); @@ -1473,8 +1473,9 @@ impl<K: Eq + Hash<S>, V, S, H: Hasher<S> + Default> Extend<(K, V)> for HashMap<K #[cfg(test)] mod test_map { - use prelude::*; + use prelude::v1::*; + use cmp::Equiv; use super::HashMap; use super::Entry::{Occupied, Vacant}; use hash; diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index 6d83d5510b3..e00116344c8 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -844,7 +844,7 @@ impl<'a, T, S, H> Iterator<&'a T> for Union<'a, T, H> #[cfg(test)] mod test_set { - use prelude::*; + use prelude::v1::*; use super::HashSet; |
