about summary refs log tree commit diff
path: root/src/libsyntax/util/parser_testing.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-02-28 13:09:09 -0800
committerPatrick Walton <pcwalton@mimiga.net>2014-03-01 22:40:52 -0800
commit58fd6ab90db3eb68c94695e1254a73e57bc44658 (patch)
tree51078e799ec82df848205dce6f32a8f1c0c312f5 /src/libsyntax/util/parser_testing.rs
parentdf40aeccdbfcfb0cc7851c6df24f28fbeccfe046 (diff)
downloadrust-58fd6ab90db3eb68c94695e1254a73e57bc44658.tar.gz
rust-58fd6ab90db3eb68c94695e1254a73e57bc44658.zip
libsyntax: Mechanically change `~[T]` to `Vec<T>`
Diffstat (limited to 'src/libsyntax/util/parser_testing.rs')
-rw-r--r--src/libsyntax/util/parser_testing.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/util/parser_testing.rs b/src/libsyntax/util/parser_testing.rs
index 8c7ad028a8e..36243350d21 100644
--- a/src/libsyntax/util/parser_testing.rs
+++ b/src/libsyntax/util/parser_testing.rs
@@ -17,20 +17,20 @@ use parse::token;
 
 // map a string to tts, using a made-up filename: return both the TokenTree's
 // and the ParseSess
-pub fn string_to_tts_and_sess (source_str : ~str) -> (~[ast::TokenTree], @ParseSess) {
+pub fn string_to_tts_and_sess (source_str : ~str) -> (Vec<ast::TokenTree> , @ParseSess) {
     let ps = new_parse_sess();
     (filemap_to_tts(ps,string_to_filemap(ps,source_str,~"bogofile")),ps)
 }
 
 // map a string to tts, using a made-up filename:
-pub fn string_to_tts(source_str : ~str) -> ~[ast::TokenTree] {
+pub fn string_to_tts(source_str : ~str) -> Vec<ast::TokenTree> {
     let (tts,_) = string_to_tts_and_sess(source_str);
     tts
 }
 
 pub fn string_to_parser_and_sess(source_str: ~str) -> (Parser,@ParseSess) {
     let ps = new_parse_sess();
-    (new_parser_from_source_str(ps,~[],~"bogofile",source_str),ps)
+    (new_parser_from_source_str(ps,Vec::new(),~"bogofile",source_str),ps)
 }
 
 // map string to parser (via tts)
@@ -69,14 +69,14 @@ pub fn string_to_expr (source_str : ~str) -> @ast::Expr {
 // parse a string, return an item
 pub fn string_to_item (source_str : ~str) -> Option<@ast::Item> {
     with_error_checking_parse(source_str, |p| {
-        p.parse_item(~[])
+        p.parse_item(Vec::new())
     })
 }
 
 // parse a string, return a stmt
 pub fn string_to_stmt(source_str : ~str) -> @ast::Stmt {
     with_error_checking_parse(source_str, |p| {
-        p.parse_stmt(~[])
+        p.parse_stmt(Vec::new())
     })
 }
 
@@ -87,7 +87,7 @@ pub fn string_to_pat(source_str : ~str) -> @ast::Pat {
 }
 
 // convert a vector of strings to a vector of ast::Ident's
-pub fn strs_to_idents(ids: ~[&str]) -> ~[ast::Ident] {
+pub fn strs_to_idents(ids: Vec<&str> ) -> Vec<ast::Ident> {
     ids.map(|u| token::str_to_ident(*u))
 }