Skip to content

Commit b25721d

Browse files
committed
Address comments from PR #8418.
1 parent de48274 commit b25721d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,9 @@ impl Parser {
399399
let actual = self.this_token_to_str();
400400
self.fatal(
401401
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)
403403
} else {
404-
fmt!("expected `%s` but found `%s`", expect, actual)
404+
fmt!("expected `%s`, found `%s`", expect, actual)
405405
}
406406
)
407407
}
@@ -416,7 +416,7 @@ impl Parser {
416416
&& self.look_ahead(1, |t| *t == token::RBRACE) {
417417
// matched; signal non-fatal error and recover.
418418
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 `{ }`");
420420
self.eat(&token::LBRACE);
421421
self.eat(&token::RBRACE);
422422
true
@@ -450,7 +450,7 @@ impl Parser {
450450
// for recoverable input errors, discarding erroneous characters.
451451
pub fn commit_stmt(&self, s: @stmt, edible: &[token::Token], inedible: &[token::Token]) {
452452
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`.
454454
if self.last_token.map_default(false, |t|is_ident_or_path(*t)) {
455455
let expected = vec::append(edible.to_owned(), inedible);
456456
self.check_for_erroneous_unit_struct_expecting(expected);
@@ -1428,7 +1428,7 @@ impl Parser {
14281428
})
14291429
}
14301430
_ => {
1431-
self.fatal(fmt!("Expected a lifetime name"));
1431+
self.fatal(fmt!("expected a lifetime name"));
14321432
}
14331433
}
14341434
} else {
@@ -1448,7 +1448,7 @@ impl Parser {
14481448
} else if v.len() == 1 {
14491449
Some(*v.get(0))
14501450
} else {
1451-
self.fatal(fmt!("Expected at most one \
1451+
self.fatal(fmt!("expected at most one \
14521452
lifetime name (for now)"));
14531453
}
14541454
}
@@ -1532,7 +1532,7 @@ impl Parser {
15321532
}
15331533

15341534
_ => {
1535-
self.fatal(fmt!("Expected a lifetime name"));
1535+
self.fatal(fmt!("expected a lifetime name"));
15361536
}
15371537
}
15381538
}
@@ -3843,7 +3843,7 @@ impl Parser {
38433843
}
38443844
}
38453845
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;`",
38473847
get_ident_interner().get(class_name.name)));
38483848
}
38493849
self.bump();

0 commit comments

Comments
 (0)