stderr_out.as_slice());
ProcRes {
- status: process::ExitStatus(exitcode),
+ status: process::ProcessExit::ExitStatus(exitcode),
stdout: stdout_out,
stderr: stderr_out,
cmdline: cmdline
#![doc(primitive = "str")]
-pub use self::MaybeOwned::*;
+use self::MaybeOwned::*;
use self::RecompositionState::*;
use self::DecompositionType::*;
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() {
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.
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};
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;
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;
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.
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;
}
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));
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;
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;
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};
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};
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};
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};
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;
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;
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;
//
// 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
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
.into_mut_refs()
.1;
},
- table::Full(bucket) => bucket
+ Full(bucket) => bucket
};
let probe_ib = full_bucket.index() - full_bucket.distance();
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;
//
// ignore-lexer-test FIXME #15883
-pub use self::BucketState::*;
+use self::BucketState::*;
use clone::Clone;
use cmp;
target_os = "freebsd",
target_os = "dragonfly"))]
pub mod dl {
- pub use self::Rtld::*;
+ use self::Rtld::*;
use prelude::*;
use c_str::CString;
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};
#[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
}
#[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
}
#[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
#[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
}
#[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
}
#[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
}
#[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
}
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};
#[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
}
#[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
}
#[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
#[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
}
#[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
}
#[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
}
#[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
}
#![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};
#![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};
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)
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);
//! Windows file path handling
-pub use self::PathPrefix::*;
+use self::PathPrefix::*;
use ascii::AsciiCast;
use c_str::{CString, ToCStr};
mod tests {
use prelude::*;
use super::*;
+ use super::PathPrefix::*;
use super::parse_prefix;
macro_rules! t {
// 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};
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> {
use sys;
use sys_common;
use sys_common::net;
+use sys_common::net::SocketStatus::Readable;
pub use sys_common::net::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())
//!
//! Note that all time units in this file are in *milliseconds*.
-pub use self::Req::*;
+use self::Req::*;
use libc;
use mem;
//! 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;
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
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.
#![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;
#![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");
}