Skip to content

Commit 25f8051

Browse files
committed
rollup merge of #19842: frewsxcv/rm-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/os.rs * MemoryMapKind * MapOption * MapError * src/libstd/sys/common/net.rs * SocketStatus * InAddr * src/libstd/sys/unix/timer.rs * Req [breaking-change]
2 parents bc99ced + 98af642 commit 25f8051

File tree

34 files changed

+86
-72
lines changed

34 files changed

+86
-72
lines changed

src/compiletest/runtest.rs

+1-1
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

+2-2
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

+2-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+3-3
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

+1-1
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

+1-1
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

+2-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+10-7
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,8 @@ mod test_map {
14701472
use prelude::*;
14711473

14721474
use super::HashMap;
1473-
use super::{Occupied, Vacant};
1475+
use super::Entry::{Occupied, Vacant};
1476+
use cmp::Equiv;
14741477
use hash;
14751478
use iter::{range_inclusive, range_step_inclusive};
14761479
use cell::RefCell;

src/libstd/collections/hash/table.rs

+1-1
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

+1-1
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

+10-8
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

0 commit comments

Comments
 (0)