@@ -399,9 +399,9 @@ impl Parser {
399
399
let actual = self . this_token_to_str ( ) ;
400
400
self . fatal (
401
401
if expected. len ( ) != 1 {
402
- fmt ! ( "expected one of `%s` but found `%s`" , expect, actual)
402
+ fmt ! ( "expected one of `%s`, found `%s`" , expect, actual)
403
403
} else {
404
- fmt ! ( "expected `%s` but found `%s`" , expect, actual)
404
+ fmt ! ( "expected `%s`, found `%s`" , expect, actual)
405
405
}
406
406
)
407
407
}
@@ -416,7 +416,7 @@ impl Parser {
416
416
&& self . look_ahead ( 1 , |t| * t == token:: RBRACE ) {
417
417
// matched; signal non-fatal error and recover.
418
418
self . span_err ( * self . span ,
419
- "Unit -like struct construction is written with no trailing `{ }`" ) ;
419
+ "unit -like struct construction is written with no trailing `{ }`" ) ;
420
420
self . eat ( & token:: LBRACE ) ;
421
421
self . eat ( & token:: RBRACE ) ;
422
422
true
@@ -450,7 +450,7 @@ impl Parser {
450
450
// for recoverable input errors, discarding erroneous characters.
451
451
pub fn commit_stmt ( & self , s: @stmt, edible : & [ token:: Token ] , inedible : & [ token:: Token ] ) {
452
452
debug ! ( "commit_stmt %?" , s) ;
453
- let _s = s; // unused, but future checks might want to inspect `s`.
453
+ let _ = s; // unused, but future checks might want to inspect `s`.
454
454
if self . last_token . map_default ( false , |t|is_ident_or_path ( * t) ) {
455
455
let expected = vec:: append ( edible. to_owned ( ) , inedible) ;
456
456
self . check_for_erroneous_unit_struct_expecting ( expected) ;
@@ -1428,7 +1428,7 @@ impl Parser {
1428
1428
} )
1429
1429
}
1430
1430
_ => {
1431
- self . fatal ( fmt ! ( "Expected a lifetime name" ) ) ;
1431
+ self . fatal ( fmt ! ( "expected a lifetime name" ) ) ;
1432
1432
}
1433
1433
}
1434
1434
} else {
@@ -1448,7 +1448,7 @@ impl Parser {
1448
1448
} else if v. len ( ) == 1 {
1449
1449
Some ( * v. get ( 0 ) )
1450
1450
} else {
1451
- self . fatal ( fmt ! ( "Expected at most one \
1451
+ self . fatal ( fmt ! ( "expected at most one \
1452
1452
lifetime name (for now)") ) ;
1453
1453
}
1454
1454
}
@@ -1532,7 +1532,7 @@ impl Parser {
1532
1532
}
1533
1533
1534
1534
_ => {
1535
- self . fatal ( fmt ! ( "Expected a lifetime name" ) ) ;
1535
+ self . fatal ( fmt ! ( "expected a lifetime name" ) ) ;
1536
1536
}
1537
1537
}
1538
1538
}
@@ -3843,7 +3843,7 @@ impl Parser {
3843
3843
}
3844
3844
}
3845
3845
if fields. len ( ) == 0 {
3846
- self . fatal ( fmt ! ( "Unit -like struct definition should be written as `struct %s;`" ,
3846
+ self . fatal ( fmt ! ( "unit -like struct definition should be written as `struct %s;`" ,
3847
3847
get_ident_interner( ) . get( class_name. name) ) ) ;
3848
3848
}
3849
3849
self . bump ( ) ;
0 commit comments