From de367157b55ee8664dfceec2c2e291087d5c188a Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 8 Jun 2013 21:38:47 -0400 Subject: remove deprecated vec::{is_empty, len} functions --- src/libsyntax/ast_map.rs | 2 +- src/libsyntax/parse/parser.rs | 4 ++-- src/libsyntax/print/pprust.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs index ec77ba88530..fecded5e87b 100644 --- a/src/libsyntax/ast_map.rs +++ b/src/libsyntax/ast_map.rs @@ -66,7 +66,7 @@ pub fn path_to_str_with_sep(p: &[path_elt], sep: &str, itr: @ident_interner) } pub fn path_ident_to_str(p: &path, i: ident, itr: @ident_interner) -> ~str { - if vec::is_empty(*p) { + if p.is_empty() { //FIXME /* FIXME (#2543) */ copy *i copy *itr.get(i.name) } else { diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 8ebb7de0bfe..59db35201f1 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2768,7 +2768,7 @@ impl Parser { attributes_box.push_all(self.parse_outer_attributes()); match *self.token { token::SEMI => { - if !vec::is_empty(attributes_box) { + if !attributes_box.is_empty() { self.span_err(*self.last_span, "expected item after attributes"); attributes_box = ~[]; } @@ -2839,7 +2839,7 @@ impl Parser { } } - if !vec::is_empty(attributes_box) { + if !attributes_box.is_empty() { self.span_err(*self.last_span, "expected item after attributes"); } diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index e871ee5c9bf..5c81d406cd2 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -2041,7 +2041,7 @@ pub fn lit_to_str(l: @ast::lit) -> ~str { pub fn next_lit(s: @ps, pos: BytePos) -> Option { match s.literals { Some(ref lits) => { - while s.cur_cmnt_and_lit.cur_lit < vec::len((*lits)) { + while s.cur_cmnt_and_lit.cur_lit < lits.len() { let ltrl = /*bad*/ copy (*lits)[s.cur_cmnt_and_lit.cur_lit]; if ltrl.pos > pos { return None; } s.cur_cmnt_and_lit.cur_lit += 1u; @@ -2128,7 +2128,7 @@ pub fn to_str(t: T, f: @fn(@ps, T), intr: @ident_interner) -> ~str { pub fn next_comment(s: @ps) -> Option { match s.comments { Some(ref cmnts) => { - if s.cur_cmnt_and_lit.cur_cmnt < vec::len((*cmnts)) { + if s.cur_cmnt_and_lit.cur_cmnt < cmnts.len() { return Some(copy cmnts[s.cur_cmnt_and_lit.cur_cmnt]); } else { return None::; } } -- cgit 1.4.1-3-g733a5