@@ -23,8 +23,6 @@ use rustc_span::symbol::{kw, sym, Ident, Symbol};
23
23
use rustc_span:: { BytePos , Pos } ;
24
24
use std:: mem;
25
25
26
- use tracing:: debug;
27
-
28
26
/// Possibly accepts an `token::Interpolated` expression (a pre-parsed expression
29
27
/// dropped into the token stream, which happens while parsing the result of
30
28
/// macro expansion). Placement of these is not as complex as I feared it would
@@ -165,24 +163,18 @@ impl<'a> Parser<'a> {
165
163
if [ token:: DotDot , token:: DotDotDot , token:: DotDotEq ] . contains ( & self . token . kind ) {
166
164
return self . parse_prefix_range_expr ( attrs) ;
167
165
} else {
168
- let result = self . parse_prefix_expr ( attrs) ;
169
- debug ! ( "parse_prefix_expr result: {:?}" , & result) ;
170
- result?
166
+ self . parse_prefix_expr ( attrs) ?
171
167
}
172
168
} ;
173
- debug ! ( "parse_assoc_expr_with(lhs = {:?})" , & lhs) ;
174
169
let last_type_ascription_set = self . last_type_ascription . is_some ( ) ;
175
170
176
171
if !self . should_continue_as_assoc_expr ( & lhs) {
177
172
self . last_type_ascription = None ;
178
173
return Ok ( lhs) ;
179
174
}
180
175
181
- debug ! ( "continue_as_assoc_expr" ) ;
182
-
183
176
self . expected_tokens . push ( TokenType :: Operator ) ;
184
177
while let Some ( op) = self . check_assoc_op ( ) {
185
- debug ! ( "op: {:?}" , op) ;
186
178
// Adjust the span for interpolated LHS to point to the `$lhs` token
187
179
// and not to what it refers to.
188
180
let lhs_span = match self . prev_token . kind {
@@ -363,7 +355,6 @@ impl<'a> Parser<'a> {
363
355
/// but the next token implies this should be parsed as an expression.
364
356
/// For example: `if let Some(x) = x { x } else { 0 } / 2`.
365
357
fn error_found_expr_would_be_stmt ( & self , lhs : & Expr ) {
366
- debug ! ( "error_found_expr_would_be_stmt(lhs: {:?})" , lhs) ;
367
358
let mut err = self . struct_span_err (
368
359
self . token . span ,
369
360
& format ! ( "expected expression, found `{}`" , pprust:: token_to_string( & self . token) , ) ,
@@ -526,7 +517,6 @@ impl<'a> Parser<'a> {
526
517
make_it ! ( this, attrs, |this, _| this. parse_borrow_expr( lo) )
527
518
}
528
519
token:: BinOp ( token:: Plus ) => {
529
- debug ! ( "leading + detected: {:?}" , lo) ;
530
520
let mut err = this. struct_span_err ( lo, "leading `+` is not supported" ) ;
531
521
err. span_label ( lo, "unexpected `+`" ) ;
532
522
0 commit comments