]> git.lizzy.rs Git - rust.git/commitdiff
Remove a ton of public reexports
authorCorey Farwell <coreyf@rwell.org>
Sat, 13 Dec 2014 16:15:18 +0000 (11:15 -0500)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 21 Dec 2014 17:26:41 +0000 (09:26 -0800)
Remove most of the public reexports mentioned in #19253

These are all leftovers from the enum namespacing transition

In particular:

* src/libstd/num/strconv.rs
 * ExponentFormat
 * SignificantDigits
 * SignFormat
* src/libstd/path/windows.rs
 * PathPrefix
* src/libstd/sys/windows/timer.rs
 * Req
* src/libcollections/str.rs
 * MaybeOwned
* src/libstd/collections/hash/map.rs
 * Entry
* src/libstd/collections/hash/table.rs
 * BucketState
* src/libstd/dynamic_lib.rs
 * Rtld
* src/libstd/io/net/ip.rs
 * IpAddr
* src/libstd/os.rs
 * MemoryMapKind
 * MapOption
 * MapError
* src/libstd/sys/common/net.rs
 * SocketStatus
 * InAddr
* src/libstd/sys/unix/timer.rs
 * Req

[breaking-change]

34 files changed:
src/compiletest/runtest.rs
src/libcollections/str.rs
src/libcollections/string.rs
src/librustc/lint/builtin.rs
src/librustc/metadata/creader.rs
src/librustc/metadata/loader.rs
src/librustc/middle/const_eval.rs
src/librustc/middle/infer/freshen.rs
src/librustc/middle/infer/region_inference/graphviz.rs
src/librustc/middle/traits/fulfill.rs
src/librustc/middle/ty.rs
src/librustc/session/config.rs
src/librustc_resolve/lib.rs
src/librustc_typeck/check/_match.rs
src/librustc_typeck/check/regionck.rs
src/librustdoc/html/render.rs
src/librustdoc/lib.rs
src/libstd/collections/hash/map.rs
src/libstd/collections/hash/table.rs
src/libstd/dynamic_lib.rs
src/libstd/num/f32.rs
src/libstd/num/f64.rs
src/libstd/num/strconv.rs
src/libstd/os.rs
src/libstd/path/windows.rs
src/libstd/sys/common/net.rs
src/libstd/sys/unix/pipe.rs
src/libstd/sys/unix/tcp.rs
src/libstd/sys/unix/timer.rs
src/libstd/sys/windows/timer.rs
src/libsyntax/ext/mtwt.rs
src/libsyntax/ext/tt/macro_parser.rs
src/libtest/stats.rs
src/test/run-pass/exponential-notation.rs

index 1457d1de7d52aec8caf1a26dc4321b5d2d5199bb..567734b0dab7b2b73f5b1397d5e6f3877e115dec 100644 (file)
@@ -1609,7 +1609,7 @@ fn _arm_exec_compiled_test(config: &Config,
                 stderr_out.as_slice());
 
     ProcRes {
-        status: process::ExitStatus(exitcode),
+        status: process::ProcessExit::ExitStatus(exitcode),
         stdout: stdout_out,
         stderr: stderr_out,
         cmdline: cmdline
index feec2a216c7036c3a2e03e81888c384c1bceefa1..bb03575b3ac271043173bb0c1ea9b77396a80c07 100644 (file)
@@ -51,7 +51,7 @@
 
 #![doc(primitive = "str")]
 
-pub use self::MaybeOwned::*;
+use self::MaybeOwned::*;
 use self::RecompositionState::*;
 use self::DecompositionType::*;
 
@@ -842,7 +842,7 @@ mod tests {
     use core::iter::AdditiveIterator;
     use super::{eq_slice, from_utf8, is_utf8, is_utf16, raw};
     use super::truncate_utf16_at_nul;
-    use super::{Owned, Slice};
+    use super::MaybeOwned::{Owned, Slice};
 
     #[test]
     fn test_eq_slice() {
index bcd1e3b36809a079d162fce3aef955d155eb96c4..edd96dd683f9e7d3fcaf247c3d50fb0c0979e4d0 100644 (file)
@@ -26,7 +26,8 @@
 
 use slice::CloneSliceExt;
 use str;
-use str::{CharRange, CowString, FromStr, StrAllocating, Owned};
+use str::{CharRange, CowString, FromStr, StrAllocating};
+use str::MaybeOwned::Owned;
 use vec::{DerefVec, Vec, as_vec};
 
 /// A growable string stored as a UTF-8 encoded buffer.
index 88b12aa5660c99929c3785e4cd6b72759915f6c8..aad3cdf8b4ae9d2fa7417c97f64c29eecfa8f0ee 100644 (file)
@@ -37,7 +37,7 @@
 use lint::{Context, LintPass, LintArray};
 
 use std::{cmp, slice};
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::num::SignedInt;
 use std::{i8, i16, i32, i64, u8, u16, u32, u64, f32, f64};
 use syntax::{abi, ast, ast_map};
index 9e87153e64a1580d71faaf8dcb025a202a37e88f..323b084afdc32b77b606fb763a2dec03de7dcfb8 100644 (file)
@@ -23,7 +23,7 @@
 use util::nodemap::FnvHashMap;
 
 use std::rc::Rc;
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use syntax::ast;
 use syntax::abi;
 use syntax::attr;
index e83f69b1e318ee5725281202557319ceaebfc930..bc34b0b45e96fbf599dba7eebd07a6f797bdd15f 100644 (file)
 
 use std::c_str::ToCStr;
 use std::cmp;
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::collections::{HashMap, HashSet};
 use std::io::fs::PathExtensions;
 use std::io;
index 9b94335654734a8b0786a511846cdce2b8dcb8e7..62f1a30f8e746dbc0fa34555e46e6d802a1cf1ff 100644 (file)
@@ -28,7 +28,7 @@
 use syntax::{ast_map, ast_util, codemap};
 
 use std::rc::Rc;
-use std::collections::hash_map::Vacant;
+use std::collections::hash_map::Entry::Vacant;
 
 //
 // This pass classifies expressions by their constant-ness.
index ebff854060caec7cfb107e4ad1db2aeb2b9af9bd..a8bf7546559fdf3835388ce4fc11af17d2bd1251 100644 (file)
@@ -34,7 +34,7 @@
 use middle::ty_fold;
 use middle::ty_fold::TypeFoldable;
 use middle::ty_fold::TypeFolder;
-use std::collections::hash_map;
+use std::collections::hash_map::{mod, Entry};
 
 use super::InferCtxt;
 use super::unify::InferCtxtMethodsForSimplyUnifiableTypes;
@@ -67,8 +67,8 @@ fn freshen<F>(&mut self,
         }
 
         match self.freshen_map.entry(key) {
-            hash_map::Occupied(entry) => *entry.get(),
-            hash_map::Vacant(entry) => {
+            Entry::Occupied(entry) => *entry.get(),
+            Entry::Vacant(entry) => {
                 let index = self.freshen_count;
                 self.freshen_count += 1;
                 let t = ty::mk_infer(self.infcx.tcx, freshener(index));
index 720de357a273d9b155658a85c8cd3012bfb84be3..3e55f6fa896bb6960bb93e0dc5dbbc76fcb9f6f9 100644 (file)
@@ -26,7 +26,7 @@
 use util::nodemap::{FnvHashMap, FnvHashSet};
 use util::ppaux::Repr;
 
-use std::collections::hash_map::Vacant;
+use std::collections::hash_map::Entry::Vacant;
 use std::io::{mod, File};
 use std::os;
 use std::sync::atomic;
index 213d97b4b344aecd851b8bfa1bf6387e49fc891b..72e4eb5d1d63478843221fddd6d6c2e64d5f6aa2 100644 (file)
@@ -12,7 +12,7 @@
 use middle::mem_categorization::Typer;
 use middle::ty::{mod, Ty};
 use std::collections::HashSet;
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::default::Default;
 use std::rc::Rc;
 use syntax::ast;
index d5c97bd6aa6c6756226f5e835a6a7355a7c81692..c2edcf1e3e25881c68c3dba256fb75772e44c419 100644 (file)
@@ -77,7 +77,8 @@
 use std::ops;
 use std::rc::Rc;
 use collections::enum_set::{EnumSet, CLike};
-use std::collections::hash_map::{HashMap, Occupied, Vacant};
+use std::collections::hash_map::HashMap;
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use syntax::abi;
 use syntax::ast::{CrateNum, DefId, DUMMY_NODE_ID, Ident, ItemTrait, LOCAL_CRATE};
 use syntax::ast::{MutImmutable, MutMutable, Name, NamedField, NodeId};
index 25cdeb83d85dc547521c640cf24649b4adef57ed..0652645907bc87ad057f8a081f61af841855a53c 100644 (file)
@@ -33,7 +33,7 @@
 use syntax::parse::token::InternedString;
 
 use std::collections::HashMap;
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use getopts::{optopt, optmulti, optflag, optflagopt};
 use getopts;
 use std::cell::{RefCell};
index 99f0a6cdfc3cfca7346433ae8abba0777b536772..ac8d5d1e977b585c9c0fa4bbf4591f43ab26320d 100644 (file)
@@ -90,7 +90,7 @@
 use syntax::visit::{mod, Visitor};
 
 use std::collections::{HashMap, HashSet};
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::cell::{Cell, RefCell};
 use std::mem::replace;
 use std::rc::{Rc, Weak};
index 44cc5fce53da35c81c0f118e2eff0b7382f2324f..081faaac1d7994a83f090ab2e358ca2973ea44e8 100644 (file)
@@ -21,7 +21,7 @@
 use util::ppaux::Repr;
 
 use std::cmp;
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use syntax::ast;
 use syntax::ast_util;
 use syntax::codemap::{Span, Spanned};
index 33c015a9a081cba3cf9895cbc97f531cb14bd7d6..8e70b8ff0da50c84f4fae9932eb432131f901756 100644 (file)
 use syntax::visit::Visitor;
 
 use std::cell::{RefCell};
-use std::collections::hash_map::{Vacant, Occupied};
+use std::collections::hash_map::Entry::{Vacant, Occupied};
 
 use self::RepeatingScope::Repeating;
 use self::SubjectNode::Subject;
index 8831b5e7d96fe5db5675c3f3055bc1abb8a3fe9f..efec620bca758ee6e2e794fb62e28fad54d077b0 100644 (file)
@@ -35,7 +35,7 @@
 pub use self::ExternalLocation::*;
 
 use std::cell::RefCell;
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::collections::{HashMap, HashSet};
 use std::default::Default;
 use std::fmt;
index 0f4968162bef4144612d757122ae1b8862a8af87..182c83d805c2dc2f946f6e4b7ee34fe0d1b06a31 100644 (file)
@@ -34,7 +34,7 @@
 
 use std::cell::RefCell;
 use std::collections::HashMap;
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::io::File;
 use std::io;
 use std::rc::Rc;
index 0b04edf67761f7738bed799e267eef1e1bb30d76..c32fec67d66731f74a1eab99966c229664e6dcb5 100644 (file)
@@ -10,7 +10,7 @@
 //
 // ignore-lexer-test FIXME #15883
 
-pub use self::Entry::*;
+use self::Entry::*;
 use self::SearchResult::*;
 use self::VacantEntryState::*;
 
 use result::Result;
 use result::Result::{Ok, Err};
 
-use super::table;
 use super::table::{
+    mod,
     Bucket,
-    Empty,
     EmptyBucket,
-    Full,
     FullBucket,
     FullBucketImm,
     FullBucketMut,
     RawTable,
     SafeHash
 };
+use super::table::BucketState::{
+    Empty,
+    Full,
+};
 
 const INITIAL_LOG2_CAP: uint = 5;
 pub const INITIAL_CAPACITY: uint = 1 << INITIAL_LOG2_CAP; // 2^5
@@ -379,7 +381,7 @@ fn robin_hood<'a, K: 'a, V: 'a>(mut bucket: FullBucketMut<'a, K, V>,
             assert!(probe.index() != idx_end);
 
             let full_bucket = match probe.peek() {
-                table::Empty(bucket) => {
+                Empty(bucket) => {
                     // Found a hole!
                     let b = bucket.put(old_hash, old_key, old_val);
                     // Now that it's stolen, just read the value's pointer
@@ -390,7 +392,7 @@ fn robin_hood<'a, K: 'a, V: 'a>(mut bucket: FullBucketMut<'a, K, V>,
                                .into_mut_refs()
                                .1;
                 },
-                table::Full(bucket) => bucket
+                Full(bucket) => bucket
             };
 
             let probe_ib = full_bucket.index() - full_bucket.distance();
@@ -1470,7 +1472,8 @@ mod test_map {
     use prelude::*;
 
     use super::HashMap;
-    use super::{Occupied, Vacant};
+    use super::Entry::{Occupied, Vacant};
+    use cmp::Equiv;
     use hash;
     use iter::{range_inclusive, range_step_inclusive};
     use cell::RefCell;
index 115edcabca1e9847af4de61b6a091ef8af71b383..ce7dbd8ea5ecb10b3c9250b3c374acba0fc06cce 100644 (file)
@@ -10,7 +10,7 @@
 //
 // ignore-lexer-test FIXME #15883
 
-pub use self::BucketState::*;
+use self::BucketState::*;
 
 use clone::Clone;
 use cmp;
index e520c70824e16c089da0053ea2a03ae5c9889bc3..4d8c7d67b8c2ea15f36ac9b090c94595c123d5d5 100644 (file)
@@ -200,7 +200,7 @@ fn test_errors_do_not_crash() {
           target_os = "freebsd",
           target_os = "dragonfly"))]
 pub mod dl {
-    pub use self::Rtld::*;
+    use self::Rtld::*;
 
     use prelude::*;
     use c_str::CString;
index d307e1f7415678b9d36e4857abf57feca3022276..951627b26cad90b5ec8dd03ab53a59acc5bc1a28 100644 (file)
@@ -21,6 +21,9 @@
 use libc::c_int;
 use num::{Float, FloatMath};
 use num::strconv;
+use num::strconv::ExponentFormat::{ExpNone, ExpDec};
+use num::strconv::SignificantDigits::{DigAll, DigMax, DigExact};
+use num::strconv::SignFormat::SignNeg;
 
 pub use core::f32::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON, MIN_VALUE};
 pub use core::f32::{MIN_POS_VALUE, MAX_VALUE, MIN_EXP, MAX_EXP, MIN_10_EXP};
@@ -252,7 +255,7 @@ fn atanh(self) -> f32 {
 #[experimental = "may be removed or relocated"]
 pub fn to_string(num: f32) -> String {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
+        num, 10u, true, SignNeg, DigAll, ExpNone, false);
     r
 }
 
@@ -265,7 +268,7 @@ pub fn to_string(num: f32) -> String {
 #[experimental = "may be removed or relocated"]
 pub fn to_str_hex(num: f32) -> String {
     let (r, _) = strconv::float_to_str_common(
-        num, 16u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
+        num, 16u, true, SignNeg, DigAll, ExpNone, false);
     r
 }
 
@@ -279,8 +282,7 @@ pub fn to_str_hex(num: f32) -> String {
 #[inline]
 #[experimental = "may be removed or relocated"]
 pub fn to_str_radix_special(num: f32, rdx: uint) -> (String, bool) {
-    strconv::float_to_str_common(num, rdx, true,
-                           strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false)
+    strconv::float_to_str_common(num, rdx, true, SignNeg, DigAll, ExpNone, false)
 }
 
 /// Converts a float to a string with exactly the number of
@@ -294,7 +296,7 @@ pub fn to_str_radix_special(num: f32, rdx: uint) -> (String, bool) {
 #[experimental = "may be removed or relocated"]
 pub fn to_str_exact(num: f32, dig: uint) -> String {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpNone, false);
+        num, 10u, true, SignNeg, DigExact(dig), ExpNone, false);
     r
 }
 
@@ -309,7 +311,7 @@ pub fn to_str_exact(num: f32, dig: uint) -> String {
 #[experimental = "may be removed or relocated"]
 pub fn to_str_digits(num: f32, dig: uint) -> String {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpNone, false);
+        num, 10u, true, SignNeg, DigMax(dig), ExpNone, false);
     r
 }
 
@@ -325,7 +327,7 @@ pub fn to_str_digits(num: f32, dig: uint) -> String {
 #[experimental = "may be removed or relocated"]
 pub fn to_str_exp_exact(num: f32, dig: uint, upper: bool) -> String {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpDec, upper);
+        num, 10u, true, SignNeg, DigExact(dig), ExpDec, upper);
     r
 }
 
@@ -341,7 +343,7 @@ pub fn to_str_exp_exact(num: f32, dig: uint, upper: bool) -> String {
 #[experimental = "may be removed or relocated"]
 pub fn to_str_exp_digits(num: f32, dig: uint, upper: bool) -> String {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpDec, upper);
+        num, 10u, true, SignNeg, DigMax(dig), ExpDec, upper);
     r
 }
 
index dfe20d59c82ce958de064ba2678a31d50c90ef1c..7cc94b9ebbbcb9b8b4f2937cd40e8e8a22843372 100644 (file)
@@ -20,6 +20,9 @@
 use libc::c_int;
 use num::{Float, FloatMath};
 use num::strconv;
+use num::strconv::ExponentFormat::{ExpNone, ExpDec};
+use num::strconv::SignificantDigits::{DigAll, DigMax, DigExact};
+use num::strconv::SignFormat::SignNeg;
 
 pub use core::f64::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON, MIN_VALUE};
 pub use core::f64::{MIN_POS_VALUE, MAX_VALUE, MIN_EXP, MAX_EXP, MIN_10_EXP};
@@ -260,7 +263,7 @@ fn atanh(self) -> f64 {
 #[experimental = "may be removed or relocated"]
 pub fn to_string(num: f64) -> String {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
+        num, 10u, true, SignNeg, DigAll, ExpNone, false);
     r
 }
 
@@ -273,7 +276,7 @@ pub fn to_string(num: f64) -> String {
 #[experimental = "may be removed or relocated"]
 pub fn to_str_hex(num: f64) -> String {
     let (r, _) = strconv::float_to_str_common(
-        num, 16u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
+        num, 16u, true, SignNeg, DigAll, ExpNone, false);
     r
 }
 
@@ -287,8 +290,7 @@ pub fn to_str_hex(num: f64) -> String {
 #[inline]
 #[experimental = "may be removed or relocated"]
 pub fn to_str_radix_special(num: f64, rdx: uint) -> (String, bool) {
-    strconv::float_to_str_common(num, rdx, true,
-                           strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false)
+    strconv::float_to_str_common(num, rdx, true, SignNeg, DigAll, ExpNone, false)
 }
 
 /// Converts a float to a string with exactly the number of
@@ -302,7 +304,7 @@ pub fn to_str_radix_special(num: f64, rdx: uint) -> (String, bool) {
 #[experimental = "may be removed or relocated"]
 pub fn to_str_exact(num: f64, dig: uint) -> String {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpNone, false);
+        num, 10u, true, SignNeg, DigExact(dig), ExpNone, false);
     r
 }
 
@@ -317,7 +319,7 @@ pub fn to_str_exact(num: f64, dig: uint) -> String {
 #[experimental = "may be removed or relocated"]
 pub fn to_str_digits(num: f64, dig: uint) -> String {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpNone, false);
+        num, 10u, true, SignNeg, DigMax(dig), ExpNone, false);
     r
 }
 
@@ -333,7 +335,7 @@ pub fn to_str_digits(num: f64, dig: uint) -> String {
 #[experimental = "may be removed or relocated"]
 pub fn to_str_exp_exact(num: f64, dig: uint, upper: bool) -> String {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpDec, upper);
+        num, 10u, true, SignNeg, DigExact(dig), ExpDec, upper);
     r
 }
 
@@ -349,7 +351,7 @@ pub fn to_str_exp_exact(num: f64, dig: uint, upper: bool) -> String {
 #[experimental = "may be removed or relocated"]
 pub fn to_str_exp_digits(num: f64, dig: uint, upper: bool) -> String {
     let (r, _) = strconv::float_to_str_common(
-        num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpDec, upper);
+        num, 10u, true, SignNeg, DigMax(dig), ExpDec, upper);
     r
 }
 
index 016c4bd532a17e52c7dbf54796139a8b64e1bd43..b3e4dd52f89cb9d5ccc9e69297a6f368741e2c20 100644 (file)
@@ -12,9 +12,9 @@
 
 #![allow(missing_docs)]
 
-pub use self::ExponentFormat::*;
-pub use self::SignificantDigits::*;
-pub use self::SignFormat::*;
+use self::ExponentFormat::*;
+use self::SignificantDigits::*;
+use self::SignFormat::*;
 
 use char::{mod, Char};
 use num::{mod, Int, Float, FPNaN, FPInfinite, ToPrimitive};
index 20a72f45fbf9b105237d74bb2f155d6de0f6857d..258e8964a9fdfb57437bae146c9baef8a4d69813 100644 (file)
@@ -28,9 +28,9 @@
 #![allow(non_snake_case)]
 #![allow(unused_imports)]
 
-pub use self::MemoryMapKind::*;
-pub use self::MapOption::*;
-pub use self::MapError::*;
+use self::MemoryMapKind::*;
+use self::MapOption::*;
+use self::MapError::*;
 
 use clone::Clone;
 use error::{FromError, Error};
@@ -1617,8 +1617,8 @@ fn memory_map_rw() {
         use result::Result::{Ok, Err};
 
         let chunk = match os::MemoryMap::new(16, &[
-            os::MapReadable,
-            os::MapWritable
+            os::MapOption::MapReadable,
+            os::MapOption::MapWritable
         ]) {
             Ok(chunk) => chunk,
             Err(msg) => panic!("{}", msg)
@@ -1660,10 +1660,10 @@ fn get_fd(file: &File) -> libc::HANDLE {
         file.write_u8(0);
 
         let chunk = MemoryMap::new(size / 2, &[
-            MapReadable,
-            MapWritable,
-            MapFd(get_fd(&file)),
-            MapOffset(size / 2)
+            MapOption::MapReadable,
+            MapOption::MapWritable,
+            MapOption::MapFd(get_fd(&file)),
+            MapOption::MapOffset(size / 2)
         ]).unwrap();
         assert!(chunk.len > 0);
 
index b498b3e8ad08350cc9970bda56077d7e766cc11e..c2c17103554ce608e1abba4cfa9d8c2ef0d99c2c 100644 (file)
@@ -12,7 +12,7 @@
 
 //! Windows file path handling
 
-pub use self::PathPrefix::*;
+use self::PathPrefix::*;
 
 use ascii::AsciiCast;
 use c_str::{CString, ToCStr};
@@ -1117,6 +1117,7 @@ fn prefix_len(p: Option<PathPrefix>) -> uint {
 mod tests {
     use prelude::*;
     use super::*;
+    use super::PathPrefix::*;
     use super::parse_prefix;
 
     macro_rules! t {
index 73da200e1623828eec709345afb7bd4b48dfce80..382f6875b281d01c3c788659978862f17608a381 100644 (file)
@@ -8,8 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-pub use self::SocketStatus::*;
-pub use self::InAddr::*;
+use self::SocketStatus::*;
+use self::InAddr::*;
 
 use alloc::arc::Arc;
 use libc::{mod, c_char, c_int};
index 26fd410a7a9b61c19bb41426230d1e1bbbb12913..348b7cfad334ebf78aaca12cf65ff273662131be 100644 (file)
@@ -19,6 +19,7 @@
 use sys::{mod, timer, retry, c, set_nonblocking, wouldblock};
 use sys::fs::{fd_t, FileDesc};
 use sys_common::net::*;
+use sys_common::net::SocketStatus::*;
 use sys_common::{eof, mkerr_libc};
 
 fn unix_socket(ty: libc::c_int) -> IoResult<fd_t> {
index dacd754582ba77f64546c16ce7d5f422454bd456..5c99ad1e0ce223eeed6462ed42822a5f085e2f8f 100644 (file)
@@ -21,6 +21,7 @@
 use sys;
 use sys_common;
 use sys_common::net;
+use sys_common::net::SocketStatus::Readable;
 
 pub use sys_common::net::TcpStream;
 
@@ -124,7 +125,7 @@ pub fn accept(&mut self) -> IoResult<TcpStream> {
                 fd => return Ok(TcpStream::new(fd as sock_t)),
             }
             try!(net::await(&[self.fd(), self.inner.reader.fd()],
-                       deadline, net::Readable));
+                       deadline, Readable));
         }
 
         Err(sys_common::eof())
index 79a6a871f8dd41796779be5f66115b55c7fc8032..fe393b81e3d9a0a0f4194d3df54e1e28a08600c1 100644 (file)
@@ -46,7 +46,7 @@
 //!
 //! Note that all time units in this file are in *milliseconds*.
 
-pub use self::Req::*;
+use self::Req::*;
 
 use libc;
 use mem;
index e2f9e2a9201c3c260e7f55b4d3a19e2d5cff3098..7e4dd768aa975f8ef6f3a4bb8921037906acfb47 100644 (file)
@@ -20,7 +20,7 @@
 //! Other than that, the implementation is pretty straightforward in terms of
 //! the other two implementations of timers with nothing *that* new showing up.
 
-pub use self::Req::*;
+use self::Req::*;
 
 use libc;
 use ptr;
index ae979020bc7e5351cb09d16258852970fbf217e5..f0392912878ff5c8f5aba57e64a62347361d0042 100644 (file)
@@ -21,7 +21,7 @@
 
 use std::cell::RefCell;
 use std::collections::HashMap;
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 
 /// The SCTable contains a table of SyntaxContext_'s. It
 /// represents a flattened tree structure, to avoid having
index 4785fe37293c0bf3a9a365a5f53e8ba6d38fe4d8..bc639c32380f5eb040250122ed7663dc9e41dd86 100644 (file)
@@ -98,7 +98,7 @@
 use std::mem;
 use std::rc::Rc;
 use std::collections::HashMap;
-use std::collections::hash_map::{Vacant, Occupied};
+use std::collections::hash_map::Entry::{Vacant, Occupied};
 
 // To avoid costly uniqueness checks, we require that `MatchSeq` always has
 // a nonempty body.
index 7441b39f35b23f5bdb70125af55ae2a21161c7e7..41146cded704c281779f9e925f66c0a76c6e7ddc 100644 (file)
@@ -11,7 +11,7 @@
 #![allow(missing_docs)]
 
 use std::collections::hash_map;
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
 use std::fmt::Show;
 use std::hash::Hash;
 use std::io;
index f63ab7fb7c9a5ca5e6b1bc155ebf8b5a76d17cba..38d1093762432652df59625ee5e8fddebe155a7d 100644 (file)
 
 #![feature(macro_rules)]
 
-use std::num::strconv as s;
+use std::num::strconv::ExponentFormat::{ExpBin, ExpDec};
+use std::num::strconv::SignificantDigits::DigMax;
+use std::num::strconv::SignFormat::{SignAll, SignNeg};
 use std::num::strconv::float_to_str_common as to_string;
 
 macro_rules! t(($a:expr, $b:expr) => { { let (r, _) = $a; assert_eq!(r, $b.to_string()); } });
 
 pub fn main() {
     // Basic usage
-    t!(to_string(1.2345678e-5f64, 10u, true, s::SignNeg, s::DigMax(6), s::ExpDec, false),
+    t!(to_string(1.2345678e-5f64, 10u, true, SignNeg, DigMax(6), ExpDec, false),
              "1.234568e-5");
 
     // Hexadecimal output
-    t!(to_string(7.281738281250e+01f64, 16u, true, s::SignAll, s::DigMax(6), s::ExpBin, false),
+    t!(to_string(7.281738281250e+01f64, 16u, true, SignAll, DigMax(6), ExpBin, false),
               "+1.2345p+6");
-    t!(to_string(-1.777768135071e-02f64, 16u, true, s::SignAll, s::DigMax(6), s::ExpBin, false),
+    t!(to_string(-1.777768135071e-02f64, 16u, true, SignAll, DigMax(6), ExpBin, false),
              "-1.2345p-6");
 
     // Some denormals
-    t!(to_string(4.9406564584124654e-324f64, 10u, true, s::SignNeg, s::DigMax(6), s::ExpBin, false),
+    t!(to_string(4.9406564584124654e-324f64, 10u, true, SignNeg, DigMax(6), ExpBin, false),
              "1p-1074");
-    t!(to_string(2.2250738585072009e-308f64, 10u, true, s::SignNeg, s::DigMax(6), s::ExpBin, false),
+    t!(to_string(2.2250738585072009e-308f64, 10u, true, SignNeg, DigMax(6), ExpBin, false),
              "1p-1022");
 }