@@ -274,14 +274,13 @@ impl<'a> Parser<'a> {
274
274
self . bump ( ) ; // (
275
275
let sp = lo. to ( self . span ) ;
276
276
self . bump ( ) ; // )
277
- let mut err = self . struct_span_err ( sp, "incorrect use of `await`" ) ;
278
- err. span_suggestion (
279
- sp,
280
- "`await` is not a method call, remove the parentheses" ,
281
- String :: new ( ) ,
282
- Applicability :: MachineApplicable ,
283
- ) ;
284
- err. emit ( )
277
+ self . struct_span_err ( sp, "incorrect use of `await`" )
278
+ . span_suggestion (
279
+ sp,
280
+ "`await` is not a method call, remove the parentheses" ,
281
+ String :: new ( ) ,
282
+ Applicability :: MachineApplicable ,
283
+ ) . emit ( )
285
284
}
286
285
}
287
286
@@ -327,12 +326,12 @@ impl<'a> Parser<'a> {
327
326
) ;
328
327
} else {
329
328
err. note ( "type ascription is a nightly-only feature that lets \
330
- you annotate an expression with a type: `<expr>: <type>`") ;
331
- err . span_note (
332
- lhs_span,
333
- "this expression expects an ascribed type after the colon" ,
334
- ) ;
335
- err . help ( "this might be indicative of a syntax error elsewhere" ) ;
329
+ you annotate an expression with a type: `<expr>: <type>`")
330
+ . span_note (
331
+ lhs_span,
332
+ "this expression expects an ascribed type after the colon" ,
333
+ )
334
+ . help ( "this might be indicative of a syntax error elsewhere" ) ;
336
335
}
337
336
}
338
337
}
@@ -409,10 +408,10 @@ impl<'a> Parser<'a> {
409
408
if self . token . is_keyword ( keywords:: Pub ) {
410
409
match self . parse_visibility ( false ) {
411
410
Ok ( vis) => {
412
- let mut err = self . diagnostic ( )
413
- . struct_span_err ( vis. span , "unnecessary visibility qualifier" ) ;
414
- err . span_label ( vis. span , "`pub` not permitted here" ) ;
415
- err . emit ( ) ;
411
+ self . diagnostic ( )
412
+ . struct_span_err ( vis. span , "unnecessary visibility qualifier" )
413
+ . span_label ( vis. span , "`pub` not permitted here" )
414
+ . emit ( ) ;
416
415
}
417
416
Err ( mut err) => err. emit ( ) ,
418
417
}
@@ -488,15 +487,12 @@ impl<'a> Parser<'a> {
488
487
break ;
489
488
}
490
489
}
491
- token:: Comma => {
492
- if break_on_semi == SemiColonMode :: Comma &&
490
+ token:: Comma if break_on_semi == SemiColonMode :: Comma &&
493
491
brace_depth == 0 &&
494
- bracket_depth == 0 {
495
- debug ! ( "recover_stmt_ return - Semi" ) ;
496
- break ;
497
- } else {
498
- self . bump ( ) ;
499
- }
492
+ bracket_depth == 0 =>
493
+ {
494
+ debug ! ( "recover_stmt_ return - Semi" ) ;
495
+ break ;
500
496
}
501
497
_ => {
502
498
self . bump ( )
0 commit comments