about summary refs log tree commit diff
path: root/src/libsyntax/util/parser_testing.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-14 17:51:49 +0000
committerbors <bors@rust-lang.org>2014-06-14 17:51:49 +0000
commit6d8342f5e9f7093694548e761ee7df4f55243f3f (patch)
tree64606dac9c81ec4567e19f503d4d82e249dbf40a /src/libsyntax/util/parser_testing.rs
parentd64f18c490981f33f33e9c24e1ed1316e63f11fc (diff)
parentade807c6dcf6dc4454732c5e914ca06ebb429773 (diff)
downloadrust-6d8342f5e9f7093694548e761ee7df4f55243f3f.tar.gz
rust-6d8342f5e9f7093694548e761ee7df4f55243f3f.zip
auto merge of #14835 : alexcrichton/rust/no-more-at, r=brson
All functionality is now available through `Gc<T>` and `box(GC) expr`. This change also removes `GC` from the prelude (it's an experimental feature).
Diffstat (limited to 'src/libsyntax/util/parser_testing.rs')
-rw-r--r--src/libsyntax/util/parser_testing.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libsyntax/util/parser_testing.rs b/src/libsyntax/util/parser_testing.rs
index 1417cb5e857..04116dec60e 100644
--- a/src/libsyntax/util/parser_testing.rs
+++ b/src/libsyntax/util/parser_testing.rs
@@ -15,6 +15,8 @@ use parse::{new_parser_from_source_str};
 use parse::parser::Parser;
 use parse::token;
 
+use std::gc::Gc;
+
 // map a string to tts, using a made-up filename:
 pub fn string_to_tts(source_str: String) -> Vec<ast::TokenTree> {
     let ps = new_parse_sess();
@@ -46,21 +48,21 @@ pub fn string_to_crate (source_str : String) -> ast::Crate {
 }
 
 // parse a string, return an expr
-pub fn string_to_expr (source_str : String) -> @ast::Expr {
+pub fn string_to_expr (source_str : String) -> Gc<ast::Expr> {
     with_error_checking_parse(source_str, |p| {
         p.parse_expr()
     })
 }
 
 // parse a string, return an item
-pub fn string_to_item (source_str : String) -> Option<@ast::Item> {
+pub fn string_to_item (source_str : String) -> Option<Gc<ast::Item>> {
     with_error_checking_parse(source_str, |p| {
         p.parse_item(Vec::new())
     })
 }
 
 // parse a string, return a stmt
-pub fn string_to_stmt(source_str : String) -> @ast::Stmt {
+pub fn string_to_stmt(source_str : String) -> Gc<ast::Stmt> {
     with_error_checking_parse(source_str, |p| {
         p.parse_stmt(Vec::new())
     })
@@ -68,7 +70,7 @@ pub fn string_to_stmt(source_str : String) -> @ast::Stmt {
 
 // parse a string, return a pat. Uses "irrefutable"... which doesn't
 // (currently) affect parsing.
-pub fn string_to_pat(source_str: String) -> @ast::Pat {
+pub fn string_to_pat(source_str: String) -> Gc<ast::Pat> {
     string_to_parser(&new_parse_sess(), source_str).parse_pat()
 }