From 9889aae13e14c306fce8cefd669841fa40f26ee9 Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Fri, 13 Mar 2015 11:34:51 +0200 Subject: syntax: use lookahead to distinguish inner and outer attributes, instead of passing the latter around. --- src/libsyntax/util/parser_testing.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 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 89854f5d979..9b570c2b1fe 100644 --- a/src/libsyntax/util/parser_testing.rs +++ b/src/libsyntax/util/parser_testing.rs @@ -58,14 +58,14 @@ pub fn string_to_expr (source_str : String) -> P { /// Parse a string, return an item pub fn string_to_item (source_str : String) -> Option> { with_error_checking_parse(source_str, |p| { - p.parse_item(Vec::new()) + p.parse_item() }) } /// Parse a string, return a stmt pub fn string_to_stmt(source_str : String) -> P { with_error_checking_parse(source_str, |p| { - p.parse_stmt(Vec::new()) + p.parse_stmt().unwrap() }) } -- cgit 1.4.1-3-g733a5