diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-07-11 16:59:19 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-07-11 16:59:19 -0700 |
| commit | c9f7a3d2060a7b2c6f691f4f4b32328edffcf5bd (patch) | |
| tree | 18674ec831dfedb3218155643a354ab6d9df2520 /src/libsyntax/util | |
| parent | 4bb6b4a5ed1cd377c5cfd97721ad12f52e63dd41 (diff) | |
| download | rust-c9f7a3d2060a7b2c6f691f4f4b32328edffcf5bd.tar.gz rust-c9f7a3d2060a7b2c6f691f4f4b32328edffcf5bd.zip | |
Emit dropped unemitted errors to aid in ICE debugging
Diffstat (limited to 'src/libsyntax/util')
| -rw-r--r-- | src/libsyntax/util/parser_testing.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/util/parser_testing.rs b/src/libsyntax/util/parser_testing.rs index f850960624c..2ef32d37d44 100644 --- a/src/libsyntax/util/parser_testing.rs +++ b/src/libsyntax/util/parser_testing.rs @@ -34,7 +34,7 @@ fn with_error_checking_parse<'a, T, F>(s: String, ps: &'a ParseSess, f: F) -> T } /// Parse a string, return a crate. -pub fn string_to_crate (source_str : String) -> ast::Crate { +pub fn string_to_crate(source_str : String) -> ast::Crate { let ps = ParseSess::new(FilePathMapping::empty()); with_error_checking_parse(source_str, &ps, |p| { p.parse_crate_mod() @@ -42,7 +42,7 @@ pub fn string_to_crate (source_str : String) -> ast::Crate { } /// Parse a string, return an expr -pub fn string_to_expr (source_str : String) -> P<ast::Expr> { +pub fn string_to_expr(source_str : String) -> P<ast::Expr> { let ps = ParseSess::new(FilePathMapping::empty()); with_error_checking_parse(source_str, &ps, |p| { p.parse_expr() @@ -50,7 +50,7 @@ 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>> { +pub fn string_to_item(source_str : String) -> Option<P<ast::Item>> { let ps = ParseSess::new(FilePathMapping::empty()); with_error_checking_parse(source_str, &ps, |p| { p.parse_item() |
