diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2015-11-10 16:08:26 -0800 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2015-11-10 16:10:31 -0800 |
| commit | 69210a96358dcd85bf6d08f21c8e2df5b0975d3b (patch) | |
| tree | 97fe2d0eed21712a599b1799bb56ced0da285a28 /src/libsyntax/parse/mod.rs | |
| parent | 3519effc6e85b56360218a5a037346d56365376f (diff) | |
| download | rust-69210a96358dcd85bf6d08f21c8e2df5b0975d3b.tar.gz rust-69210a96358dcd85bf6d08f21c8e2df5b0975d3b.zip | |
Rename _nopanic methods to remove the suffix.
Just `sed s/_nopanic//g`. Hopefully makes libsyntax a bit more readable.
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 5c0ffb770b7..6b057df23e8 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -116,7 +116,7 @@ pub fn parse_expr_from_source_str(name: String, sess: &ParseSess) -> P<ast::Expr> { let mut p = new_parser_from_source_str(sess, cfg, name, source); - maybe_aborted(panictry!(p.parse_expr_nopanic()), p) + maybe_aborted(panictry!(p.parse_expr()), p) } pub fn parse_item_from_source_str(name: String, @@ -125,7 +125,7 @@ pub fn parse_item_from_source_str(name: String, sess: &ParseSess) -> Option<P<ast::Item>> { let mut p = new_parser_from_source_str(sess, cfg, name, source); - maybe_aborted(panictry!(p.parse_item_nopanic()), p) + maybe_aborted(panictry!(p.parse_item()), p) } pub fn parse_meta_from_source_str(name: String, @@ -148,7 +148,7 @@ pub fn parse_stmt_from_source_str(name: String, name, source ); - maybe_aborted(panictry!(p.parse_stmt_nopanic()), p) + maybe_aborted(panictry!(p.parse_stmt()), p) } // Warning: This parses with quote_depth > 0, which is not the default. @@ -882,7 +882,7 @@ mod tests { #[test] fn parse_ident_pat () { let sess = ParseSess::new(); let mut parser = string_to_parser(&sess, "b".to_string()); - assert!(panictry!(parser.parse_pat_nopanic()) + assert!(panictry!(parser.parse_pat()) == P(ast::Pat{ id: ast::DUMMY_NODE_ID, node: ast::PatIdent(ast::BindByValue(ast::MutImmutable), |
