Skip to content

Commit

Permalink
auto merge of #13028 : thestinger/rust/vec_ng, r=huonw
Browse files Browse the repository at this point in the history
Closes #12771
  • Loading branch information
bors committed Mar 20, 2014
2 parents a92dcb0 + cdab8a7 commit 4224147
Show file tree
Hide file tree
Showing 174 changed files with 314 additions and 301 deletions.
6 changes: 3 additions & 3 deletions src/libcollections/hashmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ mod test_map {
use super::HashMap;
use std::iter::{Iterator,range_inclusive,range_step_inclusive};
use std::local_data;
use std::vec_ng;
use std::vec;

#[test]
fn test_create_capacity_zero() {
Expand All @@ -1599,7 +1599,7 @@ mod test_map {
assert_eq!(*m.find(&2).unwrap(), 4);
}

local_data_key!(drop_vector: vec_ng::Vec<int>)
local_data_key!(drop_vector: vec::Vec<int>)

#[deriving(Hash, Eq)]
struct Dropable {
Expand All @@ -1625,7 +1625,7 @@ mod test_map {

#[test]
fn test_drops() {
local_data::set(drop_vector, vec_ng::Vec::from_elem(200, 0));
local_data::set(drop_vector, vec::Vec::from_elem(200, 0));

{
let mut m = HashMap::new();
Expand Down
2 changes: 1 addition & 1 deletion src/liblog/directive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

use std::cmp;
use std::vec_ng::Vec;
use std::vec::Vec;

#[deriving(Show, Clone)]
pub struct LogDirective {
Expand Down
2 changes: 1 addition & 1 deletion src/liblog/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ use std::local_data;
use std::os;
use std::rt;
use std::slice;
use std::vec_ng::Vec;
use std::vec::Vec;

use sync::one::{Once, ONCE_INIT};

Expand Down
2 changes: 1 addition & 1 deletion src/libnative/io/file_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::libc;
use std::mem;
use std::rt::rtio;
use std::slice;
use std::vec_ng::Vec;
use std::vec::Vec;

use io::{IoResult, retry, keep_going};

Expand Down
10 changes: 5 additions & 5 deletions src/libnum/bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ use rand::Rng;
use std::str;
use std::uint;
use std::{i64, u64};
use std::vec_ng;
use std::vec_ng::Vec;
use std::vec;
use std::vec::Vec;

/**
A `BigDigit` is a `BigUint`'s composing element.
Expand Down Expand Up @@ -753,7 +753,7 @@ impl BigUint {
fn shl_unit(&self, n_unit: uint) -> BigUint {
if n_unit == 0 || self.is_zero() { return (*self).clone(); }

return BigUint::new(vec_ng::append(Vec::from_elem(n_unit, ZERO_BIG_DIGIT),
return BigUint::new(vec::append(Vec::from_elem(n_unit, ZERO_BIG_DIGIT),
self.data.as_slice()));
}

Expand Down Expand Up @@ -1461,7 +1461,7 @@ mod biguint_tests {
use std::num::CheckedDiv;
use rand::{task_rng};
use std::u64;
use std::vec_ng::Vec;
use std::vec::Vec;
#[test]
fn test_from_slice() {
Expand Down Expand Up @@ -2195,7 +2195,7 @@ mod bigint_tests {
use std::num::{ToPrimitive, FromPrimitive};
use rand::{task_rng};
use std::u64;
use std::vec_ng::Vec;
use std::vec::Vec;

#[test]
fn test_from_biguint() {
Expand Down
2 changes: 1 addition & 1 deletion src/libnum/rational.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::cmp;
use std::fmt;
use std::from_str::FromStr;
use std::num::{Zero,One,ToStrRadix,FromStrRadix,Round};
use std::vec_ng::Vec;
use std::vec::Vec;
use bigint::{BigInt, BigUint, Sign, Plus, Minus};

/// Represents the ratio between 2 numbers.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/back/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use metadata::filesearch;
use lib::llvm::{ArchiveRef, llvm};

use std::cast;
use std::vec_ng::Vec;
use std::vec::Vec;
use std::io;
use std::io::{fs, TempDir};
use std::libc;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use std::ptr;
use std::str;
use std::io;
use std::io::{fs, TempDir, Process};
use std::vec_ng::Vec;
use std::vec::Vec;
use flate;
use serialize::hex::ToHex;
use syntax::abi;
Expand Down Expand Up @@ -105,7 +105,7 @@ pub mod write {
use std::io::Process;
use std::libc::{c_uint, c_int};
use std::str;
use std::vec_ng::Vec;
use std::vec::Vec;

// On android, we by default compile for armv7 processors. This enables
// things like double word CAS instructions (rather than emulating them)
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/back/mips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use back::target_strs;
use driver::session::sess_os_to_meta_os;
use metadata::loader::meta_section_name;
use std::vec_ng::Vec;
use std::vec::Vec;
use syntax::abi;

pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::t {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/back/rpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use metadata::filesearch;

use collections::HashSet;
use std::{os, slice};
use std::vec_ng::Vec;
use std::vec::Vec;
use syntax::abi;

fn not_win32(os: abi::Os) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/back/target_strs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#[allow(non_camel_case_types)];

use std::vec_ng::Vec;
use std::vec::Vec;

pub struct t {
module_asm: ~str,
Expand Down
8 changes: 4 additions & 4 deletions src/librustc/driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ use std::io::fs;
use std::io::MemReader;
use std::mem::drop;
use std::os;
use std::vec_ng::Vec;
use std::vec_ng;
use std::vec::Vec;
use std::vec;
use getopts::{optopt, optmulti, optflag, optflagopt};
use getopts;
use syntax::ast;
Expand Down Expand Up @@ -138,7 +138,7 @@ pub fn build_configuration(sess: &Session) -> ast::CrateConfig {
} else {
InternedString::new("nogc")
});
return vec_ng::append(user_cfg.move_iter().collect(),
return vec::append(user_cfg.move_iter().collect(),
default_cfg.as_slice());
}

Expand Down Expand Up @@ -835,7 +835,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> session::Options {

let level_short = level_name.slice_chars(0, 1);
let level_short = level_short.to_ascii().to_upper().into_str();
let flags = vec_ng::append(matches.opt_strs(level_short)
let flags = vec::append(matches.opt_strs(level_short)
.move_iter()
.collect(),
matches.opt_strs(level_name));
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/driver/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use syntax::{abi, ast, codemap};
use syntax;

use std::cell::{Cell, RefCell};
use std::vec_ng::Vec;
use std::vec::Vec;
use collections::HashSet;

pub struct Config {
Expand Down Expand Up @@ -407,7 +407,7 @@ macro_rules! cgoptions(
}
}

fn parse_list(slot: &mut ::std::vec_ng::Vec<~str>, v: Option<&str>)
fn parse_list(slot: &mut ::std::vec::Vec<~str>, v: Option<&str>)
-> bool {
match v {
Some(s) => {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/front/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::vec_ng::Vec;
use std::vec::Vec;
use syntax::fold::Folder;
use syntax::{ast, fold, attr};
use syntax::codemap;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/front/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use syntax::parse::token;
use driver::session::Session;

use std::cell::Cell;
use std::vec_ng::Vec;
use std::vec::Vec;

/// This is a list of all known features since the beginning of time. This list
/// can never shrink, it may only be expanded (in order to prevent old programs
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/front/std_inject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

use driver::session::Session;

use std::vec_ng::Vec;
use std::vec_ng;
use std::vec::Vec;
use std::vec;
use syntax::ast;
use syntax::attr;
use syntax::codemap::DUMMY_SP;
Expand Down Expand Up @@ -182,7 +182,7 @@ impl<'a> fold::Folder for PreludeInjector<'a> {
span: DUMMY_SP,
};

let vis = vec_ng::append(vec!(vi2), module.view_items.as_slice());
let vis = vec::append(vec!(vi2), module.view_items.as_slice());

// FIXME #2543: Bad copy.
let new_module = ast::Mod {
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/front/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ use metadata::creader::Loader;

use std::cell::RefCell;
use std::slice;
use std::vec_ng::Vec;
use std::vec_ng;
use std::vec::Vec;
use std::vec;
use syntax::ast_util::*;
use syntax::attr::AttrMetaMethods;
use syntax::attr;
Expand Down Expand Up @@ -281,7 +281,7 @@ fn should_fail(i: @ast::Item) -> bool {
fn add_test_module(cx: &TestCtxt, m: &ast::Mod) -> ast::Mod {
let testmod = mk_test_module(cx);
ast::Mod {
items: vec_ng::append_one(m.items.clone(), testmod),
items: vec::append_one(m.items.clone(), testmod),
..(*m).clone()
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ use std::io;
use std::os;
use std::str;
use std::task;
use std::vec_ng::Vec;
use std::vec_ng;
use std::vec::Vec;
use std::vec;
use syntax::ast;
use syntax::diagnostic::Emitter;
use syntax::diagnostic;
Expand Down Expand Up @@ -241,7 +241,7 @@ pub fn run_compiler(args: &[~str]) {
return;
}

let lint_flags = vec_ng::append(matches.opt_strs("W")
let lint_flags = vec::append(matches.opt_strs("W")
.move_iter()
.collect(),
matches.opt_strs("warn"));
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 metadata::loader;
use metadata::loader::Os;

use std::cell::RefCell;
use std::vec_ng::Vec;
use std::vec::Vec;
use collections::HashMap;
use syntax::ast;
use syntax::abi;
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/metadata/csearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ use middle::typeck;

use reader = serialize::ebml::reader;
use std::rc::Rc;
use std::vec_ng::Vec;
use std::vec_ng;
use std::vec::Vec;
use std::vec;
use syntax::ast;
use syntax::ast_map;
use syntax::diagnostic::expect;
Expand Down Expand Up @@ -94,7 +94,7 @@ pub fn get_item_path(tcx: &ty::ctxt, def: ast::DefId) -> Vec<ast_map::PathElem>

// FIXME #1920: This path is not always correct if the crate is not linked
// into the root namespace.
vec_ng::append(vec!(ast_map::PathMod(token::intern(cdata.name))),
vec::append(vec!(ast_map::PathMod(token::intern(cdata.name))),
path.as_slice())
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/cstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use metadata::decoder;
use metadata::loader;

use std::cell::RefCell;
use std::vec_ng::Vec;
use std::vec::Vec;
use std::c_vec::CVec;
use collections::HashMap;
use syntax::ast;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use std::io;
use std::io::extensions::u64_from_be_bytes;
use std::option;
use std::rc::Rc;
use std::vec_ng::Vec;
use std::vec::Vec;
use serialize::ebml::reader;
use serialize::ebml;
use serialize::Decodable;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use std::hash;
use std::hash::Hash;
use std::io::MemWriter;
use std::str;
use std::vec_ng::Vec;
use std::vec::Vec;
use collections::HashMap;
use syntax::abi::AbiSet;
use syntax::ast::*;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/filesearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use std::cell::RefCell;
use std::os;
use std::io::fs;
use std::vec_ng::Vec;
use std::vec::Vec;
use collections::HashSet;

pub enum FileMatch { FileMatches, FileDoesntMatch }
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 @@ -31,7 +31,7 @@ use std::io;
use std::os::consts::{macos, freebsd, linux, android, win32};
use std::str;
use std::slice;
use std::vec_ng::Vec;
use std::vec::Vec;

use collections::{HashMap, HashSet};
use flate;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/tydecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use middle::ty;

use std::str;
use std::uint;
use std::vec_ng::Vec;
use std::vec::Vec;
use syntax::abi::AbiSet;
use syntax::abi;
use syntax::ast;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/tyencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::io;
use std::io::MemWriter;
use std::str;
use std::fmt;
use std::vec_ng::Vec;
use std::vec::Vec;

use middle::ty::param_ty;
use middle::ty;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/astencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use std::cast;
use std::cell::RefCell;
use std::io::Seek;
use std::rc::Rc;
use std::vec_ng::Vec;
use std::vec::Vec;

use serialize::ebml::reader;
use serialize::ebml;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/borrowck/check_loans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use middle::borrowck::*;
use middle::moves;
use middle::ty;
use middle::typeck::MethodCall;
use std::vec_ng::Vec;
use std::vec::Vec;
use syntax::ast;
use syntax::ast_util;
use syntax::codemap::Span;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/borrowck/gather_loans/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use middle::typeck::MethodCall;
use util::common::indenter;
use util::ppaux::{Repr};

use std::vec_ng::Vec;
use std::vec::Vec;
use syntax::ast;
use syntax::ast_util;
use syntax::ast_util::IdRange;
Expand Down
Loading

0 comments on commit 4224147

Please sign in to comment.