Fill in suggestions Applicability according to @estebank

Also fix some formatting along the way.
This commit is contained in:
Vitaly _Vi Shukela 2018-09-17 03:16:08 +03:00
parent c61f4a7144
commit 2b77760944
No known key found for this signature in database
GPG key ID: C097221D6E03DF68
16 changed files with 69 additions and 46 deletions

View file

@ -3882,11 +3882,12 @@ impl<'a> Parser<'a> {
if self.token == token::CloseDelim(token::Brace) {
// If the struct looks otherwise well formed, recover and continue.
if let Some(sp) = comma_sp {
err.span_suggestion_short_with_applicability(sp,
"remove this comma",
String::new(),
Applicability::Unspecified,
);
err.span_suggestion_short_with_applicability(
sp,
"remove this comma",
String::new(),
Applicability::MachineApplicable,
);
}
err.emit();
break;