@@ -23,8 +23,6 @@ use rustc_span::symbol::{kw, sym, Ident, Symbol};
2323use rustc_span:: { BytePos , Pos } ;
2424use std:: mem;
2525
26- use tracing:: debug;
27-
2826/// Possibly accepts an `token::Interpolated` expression (a pre-parsed expression
2927/// dropped into the token stream, which happens while parsing the result of
3028/// macro expansion). Placement of these is not as complex as I feared it would
@@ -165,24 +163,18 @@ impl<'a> Parser<'a> {
165163 if [ token:: DotDot , token:: DotDotDot , token:: DotDotEq ] . contains ( & self . token . kind ) {
166164 return self . parse_prefix_range_expr ( attrs) ;
167165 } else {
168- let result = self . parse_prefix_expr ( attrs) ;
169- debug ! ( "parse_prefix_expr result: {:?}" , & result) ;
170- result?
166+ self . parse_prefix_expr ( attrs) ?
171167 }
172168 } ;
173- debug ! ( "parse_assoc_expr_with(lhs = {:?})" , & lhs) ;
174169 let last_type_ascription_set = self . last_type_ascription . is_some ( ) ;
175170
176171 if !self . should_continue_as_assoc_expr ( & lhs) {
177172 self . last_type_ascription = None ;
178173 return Ok ( lhs) ;
179174 }
180175
181- debug ! ( "continue_as_assoc_expr" ) ;
182-
183176 self . expected_tokens . push ( TokenType :: Operator ) ;
184177 while let Some ( op) = self . check_assoc_op ( ) {
185- debug ! ( "op: {:?}" , op) ;
186178 // Adjust the span for interpolated LHS to point to the `$lhs` token
187179 // and not to what it refers to.
188180 let lhs_span = match self . prev_token . kind {
@@ -363,7 +355,6 @@ impl<'a> Parser<'a> {
363355 /// but the next token implies this should be parsed as an expression.
364356 /// For example: `if let Some(x) = x { x } else { 0 } / 2`.
365357 fn error_found_expr_would_be_stmt ( & self , lhs : & Expr ) {
366- debug ! ( "error_found_expr_would_be_stmt(lhs: {:?})" , lhs) ;
367358 let mut err = self . struct_span_err (
368359 self . token . span ,
369360 & format ! ( "expected expression, found `{}`" , pprust:: token_to_string( & self . token) , ) ,
@@ -526,7 +517,6 @@ impl<'a> Parser<'a> {
526517 make_it ! ( this, attrs, |this, _| this. parse_borrow_expr( lo) )
527518 }
528519 token:: BinOp ( token:: Plus ) => {
529- debug ! ( "leading + detected: {:?}" , lo) ;
530520 let mut err = this. struct_span_err ( lo, "leading `+` is not supported" ) ;
531521 err. span_label ( lo, "unexpected `+`" ) ;
532522
0 commit comments