@@ -327,55 +327,55 @@ pub fn expand_quote_expr<'cx>(cx: &'cx mut ExtCtxt,
327327 sp : Span ,
328328 tts : & [ ast:: TokenTree ] )
329329 -> Box < base:: MacResult +' cx > {
330- let expanded = expand_parse_call ( cx, sp, "parse_expr " , vec ! ( ) , tts) ;
330+ let expanded = expand_parse_call ( cx, sp, "parse_expr_panic " , vec ! ( ) , tts) ;
331331 base:: MacEager :: expr ( expanded)
332332}
333333
334334pub fn expand_quote_item < ' cx > ( cx : & mut ExtCtxt ,
335335 sp : Span ,
336336 tts : & [ ast:: TokenTree ] )
337337 -> Box < base:: MacResult +' cx > {
338- let expanded = expand_parse_call ( cx, sp, "parse_item " , vec ! ( ) , tts) ;
338+ let expanded = expand_parse_call ( cx, sp, "parse_item_panic " , vec ! ( ) , tts) ;
339339 base:: MacEager :: expr ( expanded)
340340}
341341
342342pub fn expand_quote_pat < ' cx > ( cx : & ' cx mut ExtCtxt ,
343343 sp : Span ,
344344 tts : & [ ast:: TokenTree ] )
345345 -> Box < base:: MacResult +' cx > {
346- let expanded = expand_parse_call ( cx, sp, "parse_pat " , vec ! ( ) , tts) ;
346+ let expanded = expand_parse_call ( cx, sp, "parse_pat_panic " , vec ! ( ) , tts) ;
347347 base:: MacEager :: expr ( expanded)
348348}
349349
350350pub fn expand_quote_arm ( cx : & mut ExtCtxt ,
351351 sp : Span ,
352352 tts : & [ ast:: TokenTree ] )
353353 -> Box < base:: MacResult +' static > {
354- let expanded = expand_parse_call ( cx, sp, "parse_arm " , vec ! ( ) , tts) ;
354+ let expanded = expand_parse_call ( cx, sp, "parse_arm_panic " , vec ! ( ) , tts) ;
355355 base:: MacEager :: expr ( expanded)
356356}
357357
358358pub fn expand_quote_ty ( cx : & mut ExtCtxt ,
359359 sp : Span ,
360360 tts : & [ ast:: TokenTree ] )
361361 -> Box < base:: MacResult +' static > {
362- let expanded = expand_parse_call ( cx, sp, "parse_ty " , vec ! ( ) , tts) ;
362+ let expanded = expand_parse_call ( cx, sp, "parse_ty_panic " , vec ! ( ) , tts) ;
363363 base:: MacEager :: expr ( expanded)
364364}
365365
366366pub fn expand_quote_stmt ( cx : & mut ExtCtxt ,
367367 sp : Span ,
368368 tts : & [ ast:: TokenTree ] )
369369 -> Box < base:: MacResult +' static > {
370- let expanded = expand_parse_call ( cx, sp, "parse_stmt " , vec ! ( ) , tts) ;
370+ let expanded = expand_parse_call ( cx, sp, "parse_stmt_panic " , vec ! ( ) , tts) ;
371371 base:: MacEager :: expr ( expanded)
372372}
373373
374374pub fn expand_quote_attr ( cx : & mut ExtCtxt ,
375375 sp : Span ,
376376 tts : & [ ast:: TokenTree ] )
377377 -> Box < base:: MacResult +' static > {
378- let expanded = expand_parse_call ( cx, sp, "parse_attribute " ,
378+ let expanded = expand_parse_call ( cx, sp, "parse_attribute_panic " ,
379379 vec ! ( cx. expr_bool( sp, true ) ) , tts) ;
380380
381381 base:: MacEager :: expr ( expanded)
@@ -694,7 +694,7 @@ fn parse_arguments_to_quote(cx: &ExtCtxt, tts: &[ast::TokenTree])
694694 let mut p = cx. new_parser_from_tts ( tts) ;
695695 p. quote_depth += 1 ;
696696
697- let cx_expr = p . parse_expr ( ) ;
697+ let cx_expr = panictry ! ( p . parse_expr_nopanic ( ) ) ;
698698 if !panictry ! ( p. eat( & token:: Comma ) ) {
699699 panic ! ( p. fatal( "expected token `,`" ) ) ;
700700 }
0 commit comments