Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a ton of public reexports #19842

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

#![doc(primitive = "str")]

pub use self::MaybeOwned::*;
use self::MaybeOwned::*;
use self::RecompositionState::*;
use self::DecompositionType::*;

Expand Down Expand Up @@ -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() {
Expand Down
3 changes: 2 additions & 1 deletion src/libcollections/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ use core::raw::Slice as RawSlice;

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.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use util::nodemap::{FnvHashMap, NodeSet};
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};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/creader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use plugin::load::PluginMetadata;
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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ use util::fs;

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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/const_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use syntax::visit::{mod, Visitor};
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.
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/middle/infer/freshen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use middle::ty::{mod, Ty};
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;
Expand Down Expand Up @@ -67,8 +67,8 @@ impl<'a, 'tcx> TypeFreshener<'a, 'tcx> {
}

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));
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/infer/region_inference/graphviz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use session::config;
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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/traits/fulfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use middle::infer::InferCtxt;
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;
Expand Down
3 changes: 2 additions & 1 deletion src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ use std::mem;
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};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use syntax::parse;
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};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_resolve/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ use syntax::owned_slice::OwnedSlice;
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};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use util::nodemap::FnvHashMap;
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};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/regionck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ use syntax::visit;
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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern crate "test" as testing;

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;
Expand Down
16 changes: 9 additions & 7 deletions src/libstd/collections/hash/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// ignore-lexer-test FIXME #15883

pub use self::Entry::*;
use self::Entry::*;
use self::SearchResult::*;
use self::VacantEntryState::*;

Expand All @@ -30,18 +30,20 @@ use option::Option::{Some, None};
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
Expand Down Expand Up @@ -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
Expand All @@ -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();
Expand Down Expand Up @@ -1470,7 +1472,7 @@ mod test_map {
use prelude::*;

use super::HashMap;
use super::{Occupied, Vacant};
use super::Entry::{Occupied, Vacant};
use hash;
use iter::{range_inclusive, range_step_inclusive};
use cell::RefCell;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/collections/hash/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// ignore-lexer-test FIXME #15883

pub use self::BucketState::*;
use self::BucketState::*;

use clone::Clone;
use cmp;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/dynamic_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ mod test {
target_os = "freebsd",
target_os = "dragonfly"))]
pub mod dl {
pub use self::Rtld::*;
use self::Rtld::*;

use prelude::*;
use c_str::CString;
Expand Down
18 changes: 10 additions & 8 deletions src/libstd/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ use intrinsics;
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};
Expand Down Expand Up @@ -252,7 +255,7 @@ impl FloatMath for 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
}

Expand All @@ -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
}

Expand All @@ -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
Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand Down
Loading