From ce620320a20baa1428e679c751b1b4a8d8556ca1 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 8 Mar 2014 18:11:52 -0500 Subject: rename std::vec -> std::slice Closes #12702 --- src/libsyntax/ast.rs | 2 +- src/libsyntax/ast_map.rs | 6 +++--- src/libsyntax/ext/format.rs | 4 ++-- src/libsyntax/opt_vec.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 4ef46573e23..77b0d4b5c9d 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -520,7 +520,7 @@ pub enum Expr_ { ExprIndex(@Expr, @Expr), /// Expression that looks like a "name". For example, - /// `std::vec::from_elem::` is an ExprPath that's the "name" part + /// `std::slice::from_elem::` is an ExprPath that's the "name" part /// of a function call. ExprPath(Path), diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs index f7983933990..bfe3f833695 100644 --- a/src/libsyntax/ast_map.rs +++ b/src/libsyntax/ast_map.rs @@ -20,7 +20,7 @@ use util::small_vector::SmallVector; use std::cell::RefCell; use std::iter; -use std::vec; +use std::slice; use std::fmt; use std::vec_ng::Vec; @@ -65,9 +65,9 @@ impl<'a> Iterator for LinkedPath<'a> { } } -// HACK(eddyb) move this into libstd (value wrapper for vec::Items). +// HACK(eddyb) move this into libstd (value wrapper for slice::Items). #[deriving(Clone)] -pub struct Values<'a, T>(vec::Items<'a, T>); +pub struct Values<'a, T>(slice::Items<'a, T>); impl<'a, T: Pod> Iterator for Values<'a, T> { fn next(&mut self) -> Option { diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs index e79e584ed5c..3bfc4f6e51d 100644 --- a/src/libsyntax/ext/format.rs +++ b/src/libsyntax/ext/format.rs @@ -20,7 +20,7 @@ use rsparse = parse; use std::fmt::parse; use collections::{HashMap, HashSet}; -use std::vec; +use std::slice; use std::vec_ng::Vec; #[deriving(Eq)] @@ -610,7 +610,7 @@ impl<'a, 'b> Context<'a, 'b> { fn to_expr(&self, extra: @ast::Expr) -> @ast::Expr { let mut lets = Vec::new(); let mut locals = Vec::new(); - let mut names = vec::from_fn(self.name_positions.len(), |_| None); + let mut names = slice::from_fn(self.name_positions.len(), |_| None); let mut pats = Vec::new(); let mut heads = Vec::new(); diff --git a/src/libsyntax/opt_vec.rs b/src/libsyntax/opt_vec.rs index ec81fff51c7..aee387d6d96 100644 --- a/src/libsyntax/opt_vec.rs +++ b/src/libsyntax/opt_vec.rs @@ -16,7 +16,7 @@ */ use std::default::Default; -use std::vec; +use std::slice; use std::vec_ng::Vec; #[deriving(Clone, Encodable, Decodable, Hash)] @@ -176,7 +176,7 @@ impl Default for OptVec { } pub struct Items<'a, T> { - priv iter: Option> + priv iter: Option> } impl<'a, T> Iterator<&'a T> for Items<'a, T> { -- cgit 1.4.1-3-g733a5