Repository: kevinmehall/rust-peg (language: rust)

Issue:
Api change in latest nightly?
Getting the following error on my build server (running latest nightly: 2015-11-14):

```
/home/travis/.cargo/registry/src/github.com-0a35038f75765ae4/peg-0.3.4/src/rustast.rs:39:12: 39:30 error: no method named `parse_ty_nopanic` found for type `syntax::parse::parser::Parser<'_>` in the current scope
/home/travis/.cargo/registry/src/github.com-0a35038f75765ae4/peg-0.3.4/src/rustast.rs:39    let r = p.parse_ty_nopanic();
                                                                                                      ^~~~~~~~~~~~~~~~~~
/home/travis/.cargo/registry/src/github.com-0a35038f75765ae4/peg-0.3.4/src/rustast.rs:41:2: 41:33 error: the type of this value must be known in this context
/home/travis/.cargo/registry/src/github.com-0a35038f75765ae4/peg-0.3.4/src/rustast.rs:41    r.unwrap_or_else(|e| panic!(e))
                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/travis/.cargo/registry/src/github.com-0a35038f75765ae4/peg-0.3.4/src/peg_syntax_ext.rs:92:46: 92:66 error: no method named `parse_expr_nopanic` found for type `syntax::parse::parser::Parser<'_>` in the current scope
/home/travis/.cargo/registry/src/github.com-0a35038f75765ae4/peg-0.3.4/src/peg_syntax_ext.rs:92     let arg = cx.expander().fold_expr(parser.parse_expr_nopanic().unwrap_or_else(|e| panic!(e)));
                                                                                                                                             ^~~~~~~~~~~~~~~~~~~~
/home/travis/.cargo/registry/src/github.com-0a35038f75765ae4/peg-0.3.4/src/peg_syntax_ext.rs:93:11: 93:19 error: the type of this value must be known in this context
/home/travis/.cargo/registry/src/github.com-0a35038f75765ae4/peg-0.3.4/src/peg_syntax_ext.rs:93     match arg.node {
                                                                                                          ^~~~~~~~
error: aborting due to 4 previous errors
Build failed, waiting for other jobs to finish...
Could not compile `peg`.
```



Discussion / hints:
The `_nopanic` methods have been removed. Just removing the `_nopanic` suffix should be enough to fix this.


Fix patch:
diff --git a/src/peg_syntax_ext.rs b/src/peg_syntax_ext.rs
index d27159d..7209e7d 100755
--- a/src/peg_syntax_ext.rs
+++ b/src/peg_syntax_ext.rs
@@ -89,7 +89,7 @@ fn parse_arg(cx: &mut ExtCtxt, tts: &[ast::TokenTree]) -> Option<String> {
                                                 tts.to_vec());
     // The `expand_expr` method is called so that any macro calls in the
     // parsed expression are expanded.
-    let arg = cx.expander().fold_expr(parser.parse_expr_nopanic().unwrap_or_else(|e| panic!(e)));
+    let arg = cx.expander().fold_expr(parser.parse_expr().unwrap_or_else(|e| panic!(e)));
     match arg.node {
         ast::ExprLit(ref spanned) => {
             match spanned.node {
diff --git a/src/rustast.rs b/src/rustast.rs
index f276b1b..b30adf7 100644
--- a/src/rustast.rs
+++ b/src/rustast.rs
@@ -36,7 +36,7 @@ pub fn parse_block(ctxt: &ExtCtxt, e: &str) -> P<ast::Block> {
 
 pub fn parse_type(ctxt: &ExtCtxt, e: &str) -> P<ast::Ty> {
 	let mut p = syntax::parse::new_parser_from_source_str(&ctxt.parse_sess, Vec::new(), String::new(), e.to_string());
-	let r = p.parse_ty_nopanic();
+	let r = p.parse_ty();
 	p.abort_if_errors();
 	r.unwrap_or_else(|e| panic!(e))
 }


Test patch: