Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5fe6fc5

Browse files
committedDec 21, 2014
Remove a ton of public reexports
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]
1 parent c141f22 commit 5fe6fc5

File tree

34 files changed

+85
-72
lines changed

34 files changed

+85
-72
lines changed
 

‎src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ fn _arm_exec_compiled_test(config: &Config,
16091609
stderr_out.as_slice());
16101610

16111611
ProcRes {
1612-
status: process::ExitStatus(exitcode),
1612+
status: process::ProcessExit::ExitStatus(exitcode),
16131613
stdout: stdout_out,
16141614
stderr: stderr_out,
16151615
cmdline: cmdline

‎src/libcollections/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
5252
#![doc(primitive = "str")]
5353

54-
pub use self::MaybeOwned::*;
54+
use self::MaybeOwned::*;
5555
use self::RecompositionState::*;
5656
use self::DecompositionType::*;
5757

@@ -842,7 +842,7 @@ mod tests {
842842
use core::iter::AdditiveIterator;
843843
use super::{eq_slice, from_utf8, is_utf8, is_utf16, raw};
844844
use super::truncate_utf16_at_nul;
845-
use super::{Owned, Slice};
845+
use super::MaybeOwned::{Owned, Slice};
846846

847847
#[test]
848848
fn test_eq_slice() {

‎src/libcollections/string.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ use core::raw::Slice as RawSlice;
2626

2727
use slice::CloneSliceExt;
2828
use str;
29-
use str::{CharRange, CowString, FromStr, StrAllocating, Owned};
29+
use str::{CharRange, CowString, FromStr, StrAllocating};
30+
use str::MaybeOwned::Owned;
3031
use vec::{DerefVec, Vec, as_vec};
3132

3233
/// A growable string stored as a UTF-8 encoded buffer.

‎src/librustc/lint/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use util::nodemap::{FnvHashMap, NodeSet};
3737
use lint::{Context, LintPass, LintArray};
3838

3939
use std::{cmp, slice};
40-
use std::collections::hash_map::{Occupied, Vacant};
40+
use std::collections::hash_map::Entry::{Occupied, Vacant};
4141
use std::num::SignedInt;
4242
use std::{i8, i16, i32, i64, u8, u16, u32, u64, f32, f64};
4343
use syntax::{abi, ast, ast_map};

‎src/librustc/metadata/creader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use plugin::load::PluginMetadata;
2323
use util::nodemap::FnvHashMap;
2424

2525
use std::rc::Rc;
26-
use std::collections::hash_map::{Occupied, Vacant};
26+
use std::collections::hash_map::Entry::{Occupied, Vacant};
2727
use syntax::ast;
2828
use syntax::abi;
2929
use syntax::attr;

‎src/librustc/metadata/loader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ use util::fs;
228228

229229
use std::c_str::ToCStr;
230230
use std::cmp;
231-
use std::collections::hash_map::{Occupied, Vacant};
231+
use std::collections::hash_map::Entry::{Occupied, Vacant};
232232
use std::collections::{HashMap, HashSet};
233233
use std::io::fs::PathExtensions;
234234
use std::io;

‎src/librustc/middle/const_eval.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use syntax::visit::{mod, Visitor};
2828
use syntax::{ast_map, ast_util, codemap};
2929

3030
use std::rc::Rc;
31-
use std::collections::hash_map::Vacant;
31+
use std::collections::hash_map::Entry::Vacant;
3232

3333
//
3434
// This pass classifies expressions by their constant-ness.

‎src/librustc/middle/infer/freshen.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use middle::ty::{mod, Ty};
3434
use middle::ty_fold;
3535
use middle::ty_fold::TypeFoldable;
3636
use middle::ty_fold::TypeFolder;
37-
use std::collections::hash_map;
37+
use std::collections::hash_map::{mod, Entry};
3838

3939
use super::InferCtxt;
4040
use super::unify::InferCtxtMethodsForSimplyUnifiableTypes;
@@ -67,8 +67,8 @@ impl<'a, 'tcx> TypeFreshener<'a, 'tcx> {
6767
}
6868

6969
match self.freshen_map.entry(key) {
70-
hash_map::Occupied(entry) => *entry.get(),
71-
hash_map::Vacant(entry) => {
70+
Entry::Occupied(entry) => *entry.get(),
71+
Entry::Vacant(entry) => {
7272
let index = self.freshen_count;
7373
self.freshen_count += 1;
7474
let t = ty::mk_infer(self.infcx.tcx, freshener(index));

‎src/librustc/middle/infer/region_inference/graphviz.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use session::config;
2626
use util::nodemap::{FnvHashMap, FnvHashSet};
2727
use util::ppaux::Repr;
2828

29-
use std::collections::hash_map::Vacant;
29+
use std::collections::hash_map::Entry::Vacant;
3030
use std::io::{mod, File};
3131
use std::os;
3232
use std::sync::atomic;

‎src/librustc/middle/traits/fulfill.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use middle::infer::InferCtxt;
1212
use middle::mem_categorization::Typer;
1313
use middle::ty::{mod, Ty};
1414
use std::collections::HashSet;
15-
use std::collections::hash_map::{Occupied, Vacant};
15+
use std::collections::hash_map::Entry::{Occupied, Vacant};
1616
use std::default::Default;
1717
use std::rc::Rc;
1818
use syntax::ast;

‎src/librustc/middle/ty.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ use std::mem;
7777
use std::ops;
7878
use std::rc::Rc;
7979
use collections::enum_set::{EnumSet, CLike};
80-
use std::collections::hash_map::{HashMap, Occupied, Vacant};
80+
use std::collections::hash_map::HashMap;
81+
use std::collections::hash_map::Entry::{Occupied, Vacant};
8182
use syntax::abi;
8283
use syntax::ast::{CrateNum, DefId, DUMMY_NODE_ID, Ident, ItemTrait, LOCAL_CRATE};
8384
use syntax::ast::{MutImmutable, MutMutable, Name, NamedField, NodeId};

‎src/librustc/session/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use syntax::parse;
3333
use syntax::parse::token::InternedString;
3434

3535
use std::collections::HashMap;
36-
use std::collections::hash_map::{Occupied, Vacant};
36+
use std::collections::hash_map::Entry::{Occupied, Vacant};
3737
use getopts::{optopt, optmulti, optflag, optflagopt};
3838
use getopts;
3939
use std::cell::{RefCell};

‎src/librustc_resolve/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ use syntax::owned_slice::OwnedSlice;
9090
use syntax::visit::{mod, Visitor};
9191

9292
use std::collections::{HashMap, HashSet};
93-
use std::collections::hash_map::{Occupied, Vacant};
93+
use std::collections::hash_map::Entry::{Occupied, Vacant};
9494
use std::cell::{Cell, RefCell};
9595
use std::mem::replace;
9696
use std::rc::{Rc, Weak};

‎src/librustc_typeck/check/_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use util::nodemap::FnvHashMap;
2121
use util::ppaux::Repr;
2222

2323
use std::cmp;
24-
use std::collections::hash_map::{Occupied, Vacant};
24+
use std::collections::hash_map::Entry::{Occupied, Vacant};
2525
use syntax::ast;
2626
use syntax::ast_util;
2727
use syntax::codemap::{Span, Spanned};

‎src/librustc_typeck/check/regionck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ use syntax::visit;
135135
use syntax::visit::Visitor;
136136

137137
use std::cell::{RefCell};
138-
use std::collections::hash_map::{Vacant, Occupied};
138+
use std::collections::hash_map::Entry::{Vacant, Occupied};
139139

140140
use self::RepeatingScope::Repeating;
141141
use self::SubjectNode::Subject;

‎src/librustdoc/html/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
pub use self::ExternalLocation::*;
3636

3737
use std::cell::RefCell;
38-
use std::collections::hash_map::{Occupied, Vacant};
38+
use std::collections::hash_map::Entry::{Occupied, Vacant};
3939
use std::collections::{HashMap, HashSet};
4040
use std::default::Default;
4141
use std::fmt;

‎src/librustdoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern crate "test" as testing;
3434

3535
use std::cell::RefCell;
3636
use std::collections::HashMap;
37-
use std::collections::hash_map::{Occupied, Vacant};
37+
use std::collections::hash_map::Entry::{Occupied, Vacant};
3838
use std::io::File;
3939
use std::io;
4040
use std::rc::Rc;

‎src/libstd/collections/hash/map.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
// ignore-lexer-test FIXME #15883
1212

13-
pub use self::Entry::*;
13+
use self::Entry::*;
1414
use self::SearchResult::*;
1515
use self::VacantEntryState::*;
1616

@@ -30,18 +30,20 @@ use option::Option::{Some, None};
3030
use result::Result;
3131
use result::Result::{Ok, Err};
3232

33-
use super::table;
3433
use super::table::{
34+
mod,
3535
Bucket,
36-
Empty,
3736
EmptyBucket,
38-
Full,
3937
FullBucket,
4038
FullBucketImm,
4139
FullBucketMut,
4240
RawTable,
4341
SafeHash
4442
};
43+
use super::table::BucketState::{
44+
Empty,
45+
Full,
46+
};
4547

4648
const INITIAL_LOG2_CAP: uint = 5;
4749
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>,
379381
assert!(probe.index() != idx_end);
380382

381383
let full_bucket = match probe.peek() {
382-
table::Empty(bucket) => {
384+
Empty(bucket) => {
383385
// Found a hole!
384386
let b = bucket.put(old_hash, old_key, old_val);
385387
// 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>,
390392
.into_mut_refs()
391393
.1;
392394
},
393-
table::Full(bucket) => bucket
395+
Full(bucket) => bucket
394396
};
395397

396398
let probe_ib = full_bucket.index() - full_bucket.distance();
@@ -1470,7 +1472,7 @@ mod test_map {
14701472
use prelude::*;
14711473

14721474
use super::HashMap;
1473-
use super::{Occupied, Vacant};
1475+
use super::Entry::{Occupied, Vacant};
14741476
use hash;
14751477
use iter::{range_inclusive, range_step_inclusive};
14761478
use cell::RefCell;

‎src/libstd/collections/hash/table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
// ignore-lexer-test FIXME #15883
1212

13-
pub use self::BucketState::*;
13+
use self::BucketState::*;
1414

1515
use clone::Clone;
1616
use cmp;

‎src/libstd/dynamic_lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ mod test {
200200
target_os = "freebsd",
201201
target_os = "dragonfly"))]
202202
pub mod dl {
203-
pub use self::Rtld::*;
203+
use self::Rtld::*;
204204

205205
use prelude::*;
206206
use c_str::CString;

‎src/libstd/num/f32.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ use intrinsics;
2121
use libc::c_int;
2222
use num::{Float, FloatMath};
2323
use num::strconv;
24+
use num::strconv::ExponentFormat::{ExpNone, ExpDec};
25+
use num::strconv::SignificantDigits::{DigAll, DigMax, DigExact};
26+
use num::strconv::SignFormat::SignNeg;
2427

2528
pub use core::f32::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON, MIN_VALUE};
2629
pub use core::f32::{MIN_POS_VALUE, MAX_VALUE, MIN_EXP, MAX_EXP, MIN_10_EXP};
@@ -252,7 +255,7 @@ impl FloatMath for f32 {
252255
#[experimental = "may be removed or relocated"]
253256
pub fn to_string(num: f32) -> String {
254257
let (r, _) = strconv::float_to_str_common(
255-
num, 10u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
258+
num, 10u, true, SignNeg, DigAll, ExpNone, false);
256259
r
257260
}
258261

@@ -265,7 +268,7 @@ pub fn to_string(num: f32) -> String {
265268
#[experimental = "may be removed or relocated"]
266269
pub fn to_str_hex(num: f32) -> String {
267270
let (r, _) = strconv::float_to_str_common(
268-
num, 16u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
271+
num, 16u, true, SignNeg, DigAll, ExpNone, false);
269272
r
270273
}
271274

@@ -279,8 +282,7 @@ pub fn to_str_hex(num: f32) -> String {
279282
#[inline]
280283
#[experimental = "may be removed or relocated"]
281284
pub fn to_str_radix_special(num: f32, rdx: uint) -> (String, bool) {
282-
strconv::float_to_str_common(num, rdx, true,
283-
strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false)
285+
strconv::float_to_str_common(num, rdx, true, SignNeg, DigAll, ExpNone, false)
284286
}
285287

286288
/// 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) {
294296
#[experimental = "may be removed or relocated"]
295297
pub fn to_str_exact(num: f32, dig: uint) -> String {
296298
let (r, _) = strconv::float_to_str_common(
297-
num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpNone, false);
299+
num, 10u, true, SignNeg, DigExact(dig), ExpNone, false);
298300
r
299301
}
300302

@@ -309,7 +311,7 @@ pub fn to_str_exact(num: f32, dig: uint) -> String {
309311
#[experimental = "may be removed or relocated"]
310312
pub fn to_str_digits(num: f32, dig: uint) -> String {
311313
let (r, _) = strconv::float_to_str_common(
312-
num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpNone, false);
314+
num, 10u, true, SignNeg, DigMax(dig), ExpNone, false);
313315
r
314316
}
315317

@@ -325,7 +327,7 @@ pub fn to_str_digits(num: f32, dig: uint) -> String {
325327
#[experimental = "may be removed or relocated"]
326328
pub fn to_str_exp_exact(num: f32, dig: uint, upper: bool) -> String {
327329
let (r, _) = strconv::float_to_str_common(
328-
num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpDec, upper);
330+
num, 10u, true, SignNeg, DigExact(dig), ExpDec, upper);
329331
r
330332
}
331333

@@ -341,7 +343,7 @@ pub fn to_str_exp_exact(num: f32, dig: uint, upper: bool) -> String {
341343
#[experimental = "may be removed or relocated"]
342344
pub fn to_str_exp_digits(num: f32, dig: uint, upper: bool) -> String {
343345
let (r, _) = strconv::float_to_str_common(
344-
num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpDec, upper);
346+
num, 10u, true, SignNeg, DigMax(dig), ExpDec, upper);
345347
r
346348
}
347349

‎src/libstd/num/f64.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ use intrinsics;
2020
use libc::c_int;
2121
use num::{Float, FloatMath};
2222
use num::strconv;
23+
use num::strconv::ExponentFormat::{ExpNone, ExpDec};
24+
use num::strconv::SignificantDigits::{DigAll, DigMax, DigExact};
25+
use num::strconv::SignFormat::SignNeg;
2326

2427
pub use core::f64::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON, MIN_VALUE};
2528
pub use core::f64::{MIN_POS_VALUE, MAX_VALUE, MIN_EXP, MAX_EXP, MIN_10_EXP};
@@ -260,7 +263,7 @@ impl FloatMath for f64 {
260263
#[experimental = "may be removed or relocated"]
261264
pub fn to_string(num: f64) -> String {
262265
let (r, _) = strconv::float_to_str_common(
263-
num, 10u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
266+
num, 10u, true, SignNeg, DigAll, ExpNone, false);
264267
r
265268
}
266269

@@ -273,7 +276,7 @@ pub fn to_string(num: f64) -> String {
273276
#[experimental = "may be removed or relocated"]
274277
pub fn to_str_hex(num: f64) -> String {
275278
let (r, _) = strconv::float_to_str_common(
276-
num, 16u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
279+
num, 16u, true, SignNeg, DigAll, ExpNone, false);
277280
r
278281
}
279282

@@ -287,8 +290,7 @@ pub fn to_str_hex(num: f64) -> String {
287290
#[inline]
288291
#[experimental = "may be removed or relocated"]
289292
pub fn to_str_radix_special(num: f64, rdx: uint) -> (String, bool) {
290-
strconv::float_to_str_common(num, rdx, true,
291-
strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false)
293+
strconv::float_to_str_common(num, rdx, true, SignNeg, DigAll, ExpNone, false)
292294
}
293295

294296
/// 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) {
302304
#[experimental = "may be removed or relocated"]
303305
pub fn to_str_exact(num: f64, dig: uint) -> String {
304306
let (r, _) = strconv::float_to_str_common(
305-
num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpNone, false);
307+
num, 10u, true, SignNeg, DigExact(dig), ExpNone, false);
306308
r
307309
}
308310

@@ -317,7 +319,7 @@ pub fn to_str_exact(num: f64, dig: uint) -> String {
317319
#[experimental = "may be removed or relocated"]
318320
pub fn to_str_digits(num: f64, dig: uint) -> String {
319321
let (r, _) = strconv::float_to_str_common(
320-
num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpNone, false);
322+
num, 10u, true, SignNeg, DigMax(dig), ExpNone, false);
321323
r
322324
}
323325

@@ -333,7 +335,7 @@ pub fn to_str_digits(num: f64, dig: uint) -> String {
333335
#[experimental = "may be removed or relocated"]
334336
pub fn to_str_exp_exact(num: f64, dig: uint, upper: bool) -> String {
335337
let (r, _) = strconv::float_to_str_common(
336-
num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpDec, upper);
338+
num, 10u, true, SignNeg, DigExact(dig), ExpDec, upper);
337339
r
338340
}
339341

@@ -349,7 +351,7 @@ pub fn to_str_exp_exact(num: f64, dig: uint, upper: bool) -> String {
349351
#[experimental = "may be removed or relocated"]
350352
pub fn to_str_exp_digits(num: f64, dig: uint, upper: bool) -> String {
351353
let (r, _) = strconv::float_to_str_common(
352-
num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpDec, upper);
354+
num, 10u, true, SignNeg, DigMax(dig), ExpDec, upper);
353355
r
354356
}
355357

‎src/libstd/num/strconv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
#![allow(missing_docs)]
1414

15-
pub use self::ExponentFormat::*;
16-
pub use self::SignificantDigits::*;
17-
pub use self::SignFormat::*;
15+
use self::ExponentFormat::*;
16+
use self::SignificantDigits::*;
17+
use self::SignFormat::*;
1818

1919
use char::{mod, Char};
2020
use num::{mod, Int, Float, FPNaN, FPInfinite, ToPrimitive};

‎src/libstd/os.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
#![allow(non_snake_case)]
2929
#![allow(unused_imports)]
3030

31-
pub use self::MemoryMapKind::*;
32-
pub use self::MapOption::*;
33-
pub use self::MapError::*;
31+
use self::MemoryMapKind::*;
32+
use self::MapOption::*;
33+
use self::MapError::*;
3434

3535
use clone::Clone;
3636
use error::{FromError, Error};
@@ -1617,8 +1617,8 @@ mod tests {
16171617
use result::Result::{Ok, Err};
16181618

16191619
let chunk = match os::MemoryMap::new(16, &[
1620-
os::MapReadable,
1621-
os::MapWritable
1620+
os::MapOption::MapReadable,
1621+
os::MapOption::MapWritable
16221622
]) {
16231623
Ok(chunk) => chunk,
16241624
Err(msg) => panic!("{}", msg)
@@ -1660,10 +1660,10 @@ mod tests {
16601660
file.write_u8(0);
16611661

16621662
let chunk = MemoryMap::new(size / 2, &[
1663-
MapReadable,
1664-
MapWritable,
1665-
MapFd(get_fd(&file)),
1666-
MapOffset(size / 2)
1663+
MapOption::MapReadable,
1664+
MapOption::MapWritable,
1665+
MapOption::MapFd(get_fd(&file)),
1666+
MapOption::MapOffset(size / 2)
16671667
]).unwrap();
16681668
assert!(chunk.len > 0);
16691669

‎src/libstd/path/windows.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
//! Windows file path handling
1414
15-
pub use self::PathPrefix::*;
15+
use self::PathPrefix::*;
1616

1717
use ascii::AsciiCast;
1818
use c_str::{CString, ToCStr};
@@ -1117,6 +1117,7 @@ fn prefix_len(p: Option<PathPrefix>) -> uint {
11171117
mod tests {
11181118
use prelude::*;
11191119
use super::*;
1120+
use super::PathPrefix::*;
11201121
use super::parse_prefix;
11211122

11221123
macro_rules! t {

‎src/libstd/sys/common/net.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
pub use self::SocketStatus::*;
12-
pub use self::InAddr::*;
11+
use self::SocketStatus::*;
12+
use self::InAddr::*;
1313

1414
use alloc::arc::Arc;
1515
use libc::{mod, c_char, c_int};

‎src/libstd/sys/unix/pipe.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use prelude::*;
1919
use sys::{mod, timer, retry, c, set_nonblocking, wouldblock};
2020
use sys::fs::{fd_t, FileDesc};
2121
use sys_common::net::*;
22+
use sys_common::net::SocketStatus::*;
2223
use sys_common::{eof, mkerr_libc};
2324

2425
fn unix_socket(ty: libc::c_int) -> IoResult<fd_t> {

‎src/libstd/sys/unix/tcp.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use sys::{set_nonblocking, wouldblock};
2121
use sys;
2222
use sys_common;
2323
use sys_common::net;
24+
use sys_common::net::SocketStatus::Readable;
2425

2526
pub use sys_common::net::TcpStream;
2627

@@ -124,7 +125,7 @@ impl TcpAcceptor {
124125
fd => return Ok(TcpStream::new(fd as sock_t)),
125126
}
126127
try!(net::await(&[self.fd(), self.inner.reader.fd()],
127-
deadline, net::Readable));
128+
deadline, Readable));
128129
}
129130

130131
Err(sys_common::eof())

‎src/libstd/sys/unix/timer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
//!
4747
//! Note that all time units in this file are in *milliseconds*.
4848
49-
pub use self::Req::*;
49+
use self::Req::*;
5050

5151
use libc;
5252
use mem;

‎src/libstd/sys/windows/timer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
//! Other than that, the implementation is pretty straightforward in terms of
2121
//! the other two implementations of timers with nothing *that* new showing up.
2222
23-
pub use self::Req::*;
23+
use self::Req::*;
2424

2525
use libc;
2626
use ptr;

‎src/libsyntax/ext/mtwt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use ast::{Ident, Mrk, Name, SyntaxContext};
2121

2222
use std::cell::RefCell;
2323
use std::collections::HashMap;
24-
use std::collections::hash_map::{Occupied, Vacant};
24+
use std::collections::hash_map::Entry::{Occupied, Vacant};
2525

2626
/// The SCTable contains a table of SyntaxContext_'s. It
2727
/// represents a flattened tree structure, to avoid having

‎src/libsyntax/ext/tt/macro_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ use ptr::P;
9898
use std::mem;
9999
use std::rc::Rc;
100100
use std::collections::HashMap;
101-
use std::collections::hash_map::{Vacant, Occupied};
101+
use std::collections::hash_map::Entry::{Vacant, Occupied};
102102

103103
// To avoid costly uniqueness checks, we require that `MatchSeq` always has
104104
// a nonempty body.

‎src/libtest/stats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#![allow(missing_docs)]
1212

1313
use std::collections::hash_map;
14-
use std::collections::hash_map::{Occupied, Vacant};
14+
use std::collections::hash_map::Entry::{Occupied, Vacant};
1515
use std::fmt::Show;
1616
use std::hash::Hash;
1717
use std::io;

‎src/test/run-pass/exponential-notation.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,27 @@
1010

1111
#![feature(macro_rules)]
1212

13-
use std::num::strconv as s;
13+
use std::num::strconv::ExponentFormat::{ExpBin, ExpDec};
14+
use std::num::strconv::SignificantDigits::DigMax;
15+
use std::num::strconv::SignFormat::{SignAll, SignNeg};
1416
use std::num::strconv::float_to_str_common as to_string;
1517

1618
macro_rules! t(($a:expr, $b:expr) => { { let (r, _) = $a; assert_eq!(r, $b.to_string()); } });
1719

1820
pub fn main() {
1921
// Basic usage
20-
t!(to_string(1.2345678e-5f64, 10u, true, s::SignNeg, s::DigMax(6), s::ExpDec, false),
22+
t!(to_string(1.2345678e-5f64, 10u, true, SignNeg, DigMax(6), ExpDec, false),
2123
"1.234568e-5");
2224

2325
// Hexadecimal output
24-
t!(to_string(7.281738281250e+01f64, 16u, true, s::SignAll, s::DigMax(6), s::ExpBin, false),
26+
t!(to_string(7.281738281250e+01f64, 16u, true, SignAll, DigMax(6), ExpBin, false),
2527
"+1.2345p+6");
26-
t!(to_string(-1.777768135071e-02f64, 16u, true, s::SignAll, s::DigMax(6), s::ExpBin, false),
28+
t!(to_string(-1.777768135071e-02f64, 16u, true, SignAll, DigMax(6), ExpBin, false),
2729
"-1.2345p-6");
2830

2931
// Some denormals
30-
t!(to_string(4.9406564584124654e-324f64, 10u, true, s::SignNeg, s::DigMax(6), s::ExpBin, false),
32+
t!(to_string(4.9406564584124654e-324f64, 10u, true, SignNeg, DigMax(6), ExpBin, false),
3133
"1p-1074");
32-
t!(to_string(2.2250738585072009e-308f64, 10u, true, s::SignNeg, s::DigMax(6), s::ExpBin, false),
34+
t!(to_string(2.2250738585072009e-308f64, 10u, true, SignNeg, DigMax(6), ExpBin, false),
3335
"1p-1022");
3436
}

0 commit comments

Comments
 (0)
Please sign in to comment.