rename std::vec_ng -> std::vec

Closes #12771
This commit is contained in:
Daniel Micay
2014-03-20 03:35:51 -04:00
parent 7aded2adb6
commit 14f656d1a7
174 changed files with 290 additions and 287 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
// except according to those terms.
use std::fmt;
use std::vec_ng::Vec;
use std::vec::Vec;
use std::fmt::Show;
#[deriving(Eq)]
+2 -2
View File
@@ -21,7 +21,7 @@
use std::fmt::Show;
use std::option::Option;
use std::rc::Rc;
use std::vec_ng::Vec;
use std::vec::Vec;
use serialize::{Encodable, Decodable, Encoder, Decoder};
/// A pointer abstraction. FIXME(eddyb) #10676 use Rc<T> in the future.
@@ -1157,7 +1157,7 @@ mod test {
use codemap::*;
use super::*;
use std::vec_ng::Vec;
use std::vec::Vec;
fn is_freeze<T: Freeze>() {}
+1 -1
View File
@@ -22,7 +22,7 @@
use std::iter;
use std::slice;
use std::fmt;
use std::vec_ng::Vec;
use std::vec::Vec;
#[deriving(Clone, Eq)]
pub enum PathElem {
+2 -2
View File
@@ -22,7 +22,7 @@
use std::cell::Cell;
use std::cmp;
use std::u32;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn path_name_i(idents: &[Ident]) -> ~str {
// FIXME: Bad copies (#2543 -- same for everything else that says "bad")
@@ -711,7 +711,7 @@ mod test {
use ast::*;
use super::*;
use opt_vec;
use std::vec_ng::Vec;
use std::vec::Vec;
fn ident_to_segment(id : &Ident) -> PathSegment {
PathSegment {identifier:id.clone(),
+1 -1
View File
@@ -21,7 +21,7 @@
use crateid::CrateId;
use collections::HashSet;
use std::vec_ng::Vec;
use std::vec::Vec;
pub trait AttrMetaMethods {
// This could be changed to `fn check_name(&self, name: InternedString) ->
+1 -1
View File
@@ -24,7 +24,7 @@
use std::cell::RefCell;
use std::cmp;
use std::rc::Rc;
use std::vec_ng::Vec;
use std::vec::Vec;
use serialize::{Encodable, Decodable, Encoder, Decoder};
pub trait Pos {
+1 -1
View File
@@ -19,7 +19,7 @@
/// to be `0.0`.
use std::from_str::FromStr;
use std::vec_ng::Vec;
use std::vec::Vec;
#[deriving(Clone, Eq)]
pub struct CrateId {
+1 -1
View File
@@ -20,7 +20,7 @@
use parse::token::InternedString;
use parse::token;
use std::vec_ng::Vec;
use std::vec::Vec;
enum State {
Asm,
+1 -1
View File
@@ -20,7 +20,7 @@
use util::small_vector::SmallVector;
use collections::HashMap;
use std::vec_ng::Vec;
use std::vec::Vec;
// new-style macro! tt code:
//
+2 -2
View File
@@ -21,7 +21,7 @@
use parse::token::special_idents;
use parse::token;
use std::vec_ng::Vec;
use std::vec::Vec;
pub struct Field {
ident: ast::Ident,
@@ -585,7 +585,7 @@ fn expr_vec(&self, sp: Span, exprs: Vec<@ast::Expr> ) -> @ast::Expr {
fn expr_vec_ng(&self, sp: Span) -> @ast::Expr {
self.expr_call_global(sp,
vec!(self.ident_of("std"),
self.ident_of("vec_ng"),
self.ident_of("vec"),
self.ident_of("Vec"),
self.ident_of("new")),
Vec::new())
+1 -1
View File
@@ -17,7 +17,7 @@
use ext::build::AstBuilder;
use std::char;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_syntax_ext(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) -> base::MacResult {
// Gather all argument expressions
+1 -1
View File
@@ -26,7 +26,7 @@
use parse::token;
use parse;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_cfg(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) -> base::MacResult {
let mut p = parse::new_parser_from_tts(cx.parse_sess(),
+1 -1
View File
@@ -15,7 +15,7 @@
use opt_vec;
use parse::token;
use parse::token::{str_to_ident};
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_syntax_ext(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
-> base::MacResult {
+1 -1
View File
@@ -14,7 +14,7 @@
use ext::build::AstBuilder;
use ext::deriving::generic::*;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_clone(cx: &mut ExtCtxt,
span: Span,
+1 -1
View File
@@ -14,7 +14,7 @@
use ext::build::AstBuilder;
use ext::deriving::generic::*;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_eq(cx: &mut ExtCtxt,
span: Span,
+1 -1
View File
@@ -15,7 +15,7 @@
use ext::build::AstBuilder;
use ext::deriving::generic::*;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_ord(cx: &mut ExtCtxt,
span: Span,
+1 -1
View File
@@ -14,7 +14,7 @@
use ext::build::AstBuilder;
use ext::deriving::generic::*;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_totaleq(cx: &mut ExtCtxt,
span: Span,
+1 -1
View File
@@ -16,7 +16,7 @@
use ext::deriving::generic::*;
use std::cmp::{Ordering, Equal, Less, Greater};
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_totalord(cx: &mut ExtCtxt,
span: Span,
+1 -1
View File
@@ -21,7 +21,7 @@
use parse::token::InternedString;
use parse::token;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_decodable(cx: &mut ExtCtxt,
span: Span,
+1 -1
View File
@@ -14,7 +14,7 @@
use ext::build::AstBuilder;
use ext::deriving::generic::*;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_default(cx: &mut ExtCtxt,
span: Span,
+1 -1
View File
@@ -89,7 +89,7 @@ fn decode(d: &D) -> spanned<T> {
use ext::deriving::generic::*;
use parse::token;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_encodable(cx: &mut ExtCtxt,
span: Span,
+3 -3
View File
@@ -187,8 +187,8 @@ fn eq(&self, other: &int) -> bool {
use opt_vec;
use parse::token::InternedString;
use std::vec_ng::Vec;
use std::vec_ng;
use std::vec::Vec;
use std::vec;
pub use self::ty::*;
mod ty;
@@ -407,7 +407,7 @@ fn create_derived_impl(&self,
cx.item(
self.span,
ident,
vec_ng::append(vec!(attr), self.attributes.as_slice()),
vec::append(vec!(attr), self.attributes.as_slice()),
ast::ItemImpl(trait_generics, opt_trait_ref,
self_type, methods.map(|x| *x)))
}
+1 -1
View File
@@ -14,7 +14,7 @@
use ext::build::AstBuilder;
use ext::deriving::generic::*;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_hash(cx: &mut ExtCtxt,
span: Span,
+1 -1
View File
@@ -16,7 +16,7 @@
use ext::deriving::generic::*;
use parse::token::InternedString;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_from_primitive(cx: &mut ExtCtxt,
span: Span,
+1 -1
View File
@@ -15,7 +15,7 @@
use ext::build::{AstBuilder};
use ext::deriving::generic::*;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_rand(cx: &mut ExtCtxt,
span: Span,
+1 -1
View File
@@ -19,7 +19,7 @@
use parse::token;
use collections::HashMap;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_show(cx: &mut ExtCtxt,
span: Span,
+1 -1
View File
@@ -20,7 +20,7 @@
use codemap::{Span,respan};
use opt_vec;
use std::vec_ng::Vec;
use std::vec::Vec;
/// The types of pointers
pub enum PtrTy<'a> {
+1 -1
View File
@@ -14,7 +14,7 @@
use ext::build::AstBuilder;
use ext::deriving::generic::*;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_deriving_zero(cx: &mut ExtCtxt,
span: Span,
+1 -1
View File
@@ -22,7 +22,7 @@
use parse::token;
use std::os;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_option_env(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
-> base::MacResult {
+2 -2
View File
@@ -32,7 +32,7 @@
use std::cast;
use std::unstable::dynamic_lib::DynamicLibrary;
use std::os;
use std::vec_ng::Vec;
use std::vec::Vec;
pub fn expand_expr(e: @ast::Expr, fld: &mut MacroExpander) -> @ast::Expr {
match e.node {
@@ -979,7 +979,7 @@ mod test {
use visit;
use visit::Visitor;
use std::vec_ng::Vec;
use std::vec::Vec;
// a visitor that extracts the paths
// from a given thingy and puts them in a mutable
+1 -1
View File
@@ -21,7 +21,7 @@
use std::fmt::parse;
use collections::{HashMap, HashSet};
use std::slice;
use std::vec_ng::Vec;
use std::vec::Vec;
#[deriving(Eq)]
enum ArgumentType {
+2 -2
View File
@@ -20,7 +20,7 @@
use std::cell::RefCell;
use std::local_data;
use std::rc::Rc;
use std::vec_ng::Vec;
use std::vec::Vec;
use collections::HashMap;
@@ -281,7 +281,7 @@ mod tests {
use super::{resolve, xorPush, new_mark_internal, new_sctable_internal};
use super::{new_rename_internal, marksof_internal, resolve_internal};
use super::{SCTable, EmptyCtxt, Mark, Rename, IllegalCtxt};
use std::vec_ng::Vec;
use std::vec::Vec;
use collections::HashMap;
#[test] fn xorpush_test () {
+2 -2
View File
@@ -17,7 +17,7 @@
use parse::token;
use parse;
use std::vec_ng::Vec;
use std::vec::Vec;
/**
*
@@ -37,7 +37,7 @@ pub mod rt {
use parse;
use print::pprust;
use std::vec_ng::Vec;
use std::vec::Vec;
pub use ast::*;
pub use parse::token::*;
+1 -1
View File
@@ -15,7 +15,7 @@
use visit;
use visit::Visitor;
use std::vec_ng::Vec;
use std::vec::Vec;
struct MacroRegistrarContext {
registrars: Vec<(ast::NodeId, Span)> ,
+1 -1
View File
@@ -22,7 +22,7 @@
use parse::token;
use collections::HashMap;
use std::vec_ng::Vec;
use std::vec::Vec;
/* This is an Earley-like parser, without support for in-grammar nonterminals,
only by calling out to the main rust parser for named nonterminals (which it
+1 -1
View File
@@ -28,7 +28,7 @@
use util::small_vector::SmallVector;
use std::cell::RefCell;
use std::vec_ng::Vec;
use std::vec::Vec;
struct ParserAnyMacro<'a> {
parser: RefCell<Parser<'a>>,
+1 -1
View File
@@ -18,7 +18,7 @@
use parse::lexer::TokenAndSpan;
use std::cell::{Cell, RefCell};
use std::vec_ng::Vec;
use std::vec::Vec;
use collections::HashMap;
///an unzipping of `TokenTree`s
+1 -1
View File
@@ -16,7 +16,7 @@
use opt_vec::OptVec;
use util::small_vector::SmallVector;
use std::vec_ng::Vec;
use std::vec::Vec;
// We may eventually want to be able to fold over type parameters, too.
pub trait Folder {
+1 -1
View File
@@ -17,7 +17,7 @@
use std::default::Default;
use std::slice;
use std::vec_ng::Vec;
use std::vec::Vec;
#[deriving(Clone, Encodable, Decodable, Hash)]
pub enum OptVec<T> {
+1 -1
View File
@@ -15,7 +15,7 @@
use parse::parser::Parser;
use parse::token::INTERPOLATED;
use std::vec_ng::Vec;
use std::vec::Vec;
// a parser that can parse attributes.
pub trait ParserAttr {
+1 -1
View File
@@ -20,7 +20,7 @@
use std::io;
use std::str;
use std::uint;
use std::vec_ng::Vec;
use std::vec::Vec;
#[deriving(Clone, Eq)]
pub enum CommentStyle {
+1 -1
View File
@@ -1005,7 +1005,7 @@ mod test {
use parse::token;
use parse::token::{str_to_ident};
use std::io::util;
use std::vec_ng::Vec;
use std::vec::Vec;
fn mk_sh() -> diagnostic::SpanHandler {
let emitter = diagnostic::EmitterWriter::new(~util::NullWriter);
+2 -2
View File
@@ -21,7 +21,7 @@
use std::io::File;
use std::rc::Rc;
use std::str;
use std::vec_ng::Vec;
use std::vec::Vec;
pub mod lexer;
pub mod parser;
@@ -279,7 +279,7 @@ mod test {
use std::io;
use std::io::MemWriter;
use std::str;
use std::vec_ng::Vec;
use std::vec::Vec;
use codemap::{Span, BytePos, Spanned};
use opt_vec;
use ast;
+13 -13
View File
@@ -82,8 +82,8 @@
use collections::HashSet;
use std::kinds::marker;
use std::mem::replace;
use std::vec_ng::Vec;
use std::vec_ng;
use std::vec::Vec;
use std::vec;
#[allow(non_camel_case_types)]
#[deriving(Eq)]
@@ -271,7 +271,7 @@ fn maybe_append(lhs: Vec<Attribute> , rhs: Option<Vec<Attribute> >)
-> Vec<Attribute> {
match rhs {
None => lhs,
Some(ref attrs) => vec_ng::append(lhs, attrs.as_slice())
Some(ref attrs) => vec::append(lhs, attrs.as_slice())
}
}
@@ -407,7 +407,7 @@ fn tokens_to_str(tokens: &[token::Token]) -> ~str {
} else if inedible.contains(&self.token) {
// leave it in the input
} else {
let expected = vec_ng::append(edible.iter()
let expected = vec::append(edible.iter()
.map(|x| (*x).clone())
.collect(),
inedible);
@@ -449,7 +449,7 @@ pub fn commit_expr(&mut self, e: @Expr, edible: &[token::Token], inedible: &[tok
match e.node {
ExprPath(..) => {
// might be unit-struct construction; check for recoverableinput error.
let expected = vec_ng::append(edible.iter()
let expected = vec::append(edible.iter()
.map(|x| (*x).clone())
.collect(),
inedible);
@@ -472,7 +472,7 @@ pub fn commit_stmt(&mut self, s: @Stmt, edible: &[token::Token], inedible: &[tok
debug!("commit_stmt {:?}", s);
let _s = s; // unused, but future checks might want to inspect `s`.
if self.last_token.as_ref().map_or(false, |t| is_ident_or_path(*t)) {
let expected = vec_ng::append(edible.iter()
let expected = vec::append(edible.iter()
.map(|x| (*x).clone())
.collect(),
inedible.as_slice());
@@ -1113,7 +1113,7 @@ pub fn parse_trait_methods(&mut self) -> Vec<TraitMethod> {
debug!("parse_trait_methods(): parsing provided method");
let (inner_attrs, body) =
p.parse_inner_attrs_and_block();
let attrs = vec_ng::append(attrs, inner_attrs.as_slice());
let attrs = vec::append(attrs, inner_attrs.as_slice());
Provided(@ast::Method {
ident: ident,
attrs: attrs,
@@ -3854,7 +3854,7 @@ fn parse_method(&mut self, already_parsed_attrs: Option<Vec<Attribute> >) -> @Me
let (inner_attrs, body) = self.parse_inner_attrs_and_block();
let hi = body.span.hi;
let attrs = vec_ng::append(attrs, inner_attrs.as_slice());
let attrs = vec::append(attrs, inner_attrs.as_slice());
@ast::Method {
ident: ident,
attrs: attrs,
@@ -4086,7 +4086,7 @@ fn parse_mod_items(&mut self,
while self.token != term {
let mut attrs = self.parse_outer_attributes();
if first {
attrs = vec_ng::append(attrs_remaining.clone(),
attrs = vec::append(attrs_remaining.clone(),
attrs.as_slice());
first = false;
}
@@ -4236,7 +4236,7 @@ fn eval_src_mod_from_path(&mut self,
&path,
id_sp);
let (inner, next) = p0.parse_inner_attrs_and_next();
let mod_attrs = vec_ng::append(outer_attrs, inner.as_slice());
let mod_attrs = vec::append(outer_attrs, inner.as_slice());
let first_item_outer_attrs = next;
let m0 = p0.parse_mod_items(token::EOF, first_item_outer_attrs);
{
@@ -4561,7 +4561,7 @@ fn parse_item_or_view_item(&mut self,
match self.token {
INTERPOLATED(token::NtItem(item)) => {
self.bump();
let new_attrs = vec_ng::append(attrs, item.attrs.as_slice());
let new_attrs = vec::append(attrs, item.attrs.as_slice());
return IoviItem(@Item {
attrs: new_attrs,
..(*item).clone()
@@ -4989,7 +4989,7 @@ fn parse_items_and_view_items(&mut self,
mut extern_mod_allowed: bool,
macros_allowed: bool)
-> ParsedItemsAndViewItems {
let mut attrs = vec_ng::append(first_item_attrs,
let mut attrs = vec::append(first_item_attrs,
self.parse_outer_attributes()
.as_slice());
// First, parse view items.
@@ -5071,7 +5071,7 @@ fn parse_items_and_view_items(&mut self,
fn parse_foreign_items(&mut self, first_item_attrs: Vec<Attribute> ,
macros_allowed: bool)
-> ParsedItemsAndViewItems {
let mut attrs = vec_ng::append(first_item_attrs,
let mut attrs = vec::append(first_item_attrs,
self.parse_outer_attributes()
.as_slice());
let mut foreign_items = Vec::new();
+1 -1
View File
@@ -22,7 +22,7 @@
use std::fmt;
use std::local_data;
use std::path::BytesContainer;
use std::vec_ng::Vec;
use std::vec::Vec;
#[allow(non_camel_case_types)]
#[deriving(Clone, Encodable, Decodable, Eq, Hash, Show)]
+1 -1
View File
@@ -62,7 +62,7 @@
*/
use std::io;
use std::vec_ng::Vec;
use std::vec::Vec;
#[deriving(Clone, Eq)]
pub enum Breaks {
+2 -2
View File
@@ -32,7 +32,7 @@
use std::str;
use std::io;
use std::io::{IoResult, MemWriter};
use std::vec_ng::Vec;
use std::vec::Vec;
// The &mut State is stored here to prevent recursive type.
pub enum AnnNode<'a> {
@@ -2392,7 +2392,7 @@ mod test {
use codemap;
use parse::token;
use std::vec_ng::Vec;
use std::vec::Vec;
#[test]
fn test_fun_to_str() {
+1 -1
View File
@@ -21,7 +21,7 @@
use std::fmt;
use std::hash::Hash;
use std::rc::Rc;
use std::vec_ng::Vec;
use std::vec::Vec;
pub struct Interner<T> {
priv map: RefCell<HashMap<T, Name>>,
+1 -1
View File
@@ -15,7 +15,7 @@
use parse::parser::Parser;
use parse::token;
use std::vec_ng::Vec;
use std::vec::Vec;
// map a string to tts, using a made-up filename:
pub fn string_to_tts(source_str: ~str) -> Vec<ast::TokenTree> {
+4 -4
View File
@@ -9,8 +9,8 @@
// except according to those terms.
use std::mem;
use std::vec_ng::Vec;
use std::vec_ng;
use std::vec::Vec;
use std::vec;
/// A vector type optimized for cases where the size is almost always 0 or 1
pub enum SmallVector<T> {
@@ -114,7 +114,7 @@ pub fn move_iter(self) -> MoveItems<T> {
pub enum MoveItems<T> {
priv ZeroIterator,
priv OneIterator(T),
priv ManyIterator(vec_ng::MoveItems<T>),
priv ManyIterator(vec::MoveItems<T>),
}
impl<T> Iterator<T> for MoveItems<T> {
@@ -146,7 +146,7 @@ fn size_hint(&self) -> (uint, Option<uint>) {
mod test {
use super::*;
use std::vec_ng::Vec;
use std::vec::Vec;
#[test]
fn test_len() {
+1 -1
View File
@@ -15,7 +15,7 @@
use parse;
use opt_vec;
use opt_vec::OptVec;
use std::vec_ng::Vec;
use std::vec::Vec;
// Context-passing AST walker. Each overridden visit method has full control
// over what happens with its node, it can do its own traversal of the node's