Auto merge of #29825 - KyleMayes:move-parse-panic, r=sanxiyn
Since these functions are only used by the AST quoting syntax extensions, they should be there instead of in the parser.
This commit is contained in:
commit
929ca3cb51
3 changed files with 53 additions and 51 deletions
|
|
@ -54,7 +54,7 @@ fn expand_identity(cx: &mut ExtCtxt, _span: Span, tts: &[TokenTree])
|
|||
// Parse an expression and emit it unchanged.
|
||||
let mut parser = parse::new_parser_from_tts(cx.parse_sess(),
|
||||
cx.cfg(), tts.to_vec());
|
||||
let expr = parser.parse_expr_panic();
|
||||
let expr = parser.parse_expr().unwrap();
|
||||
MacEager::expr(quote_expr!(&mut *cx, $expr))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue