From 38efa17bb8b9c1077e7b8cd9d67da08dec3f0bda Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 21 Nov 2013 19:20:48 -0800 Subject: test: Remove all remaining non-procedure uses of `do`. --- src/libsyntax/util/parser_testing.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libsyntax/util/parser_testing.rs') diff --git a/src/libsyntax/util/parser_testing.rs b/src/libsyntax/util/parser_testing.rs index 3a2a8b10c96..2d13cdb9bbb 100644 --- a/src/libsyntax/util/parser_testing.rs +++ b/src/libsyntax/util/parser_testing.rs @@ -48,9 +48,9 @@ fn with_error_checking_parse(s: @str, f: |&mut Parser| -> T) -> T { // parse a string, return a crate. pub fn string_to_crate (source_str : @str) -> ast::Crate { - do with_error_checking_parse(source_str) |p| { + with_error_checking_parse(source_str, |p| { p.parse_crate_mod() - } + }) } // parse a string, return a crate and the ParseSess @@ -61,23 +61,23 @@ pub fn string_to_crate_and_sess (source_str : @str) -> (ast::Crate,@mut ParseSes // parse a string, return an expr pub fn string_to_expr (source_str : @str) -> @ast::Expr { - do with_error_checking_parse(source_str) |p| { + with_error_checking_parse(source_str, |p| { p.parse_expr() - } + }) } // parse a string, return an item pub fn string_to_item (source_str : @str) -> Option<@ast::item> { - do with_error_checking_parse(source_str) |p| { + with_error_checking_parse(source_str, |p| { p.parse_item(~[]) - } + }) } // parse a string, return a stmt pub fn string_to_stmt(source_str : @str) -> @ast::Stmt { - do with_error_checking_parse(source_str) |p| { + with_error_checking_parse(source_str, |p| { p.parse_stmt(~[]) - } + }) } // parse a string, return a pat. Uses "irrefutable"... which doesn't -- cgit 1.4.1-3-g733a5