diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2015-03-13 11:34:51 +0200 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2015-03-13 11:36:30 +0200 |
| commit | 9889aae13e14c306fce8cefd669841fa40f26ee9 (patch) | |
| tree | bbcd59c8ec0c1038956b9b8982f404c52311c4a8 /src/libsyntax/util | |
| parent | 79dd393a4f144fa5e6f81c720c782de3175810d7 (diff) | |
| download | rust-9889aae13e14c306fce8cefd669841fa40f26ee9.tar.gz rust-9889aae13e14c306fce8cefd669841fa40f26ee9.zip | |
syntax: use lookahead to distinguish inner and outer attributes, instead of passing the latter around.
Diffstat (limited to 'src/libsyntax/util')
| -rw-r--r-- | src/libsyntax/util/parser_testing.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<ast::Expr> { /// Parse a string, return an item pub fn string_to_item (source_str : String) -> Option<P<ast::Item>> { 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<ast::Stmt> { with_error_checking_parse(source_str, |p| { - p.parse_stmt(Vec::new()) + p.parse_stmt().unwrap() }) } |
