Reformat using the new identifier sorting from rustfmt
This commit is contained in:
parent
1173204b36
commit
c682aa162b
1455 changed files with 7152 additions and 8384 deletions
|
@ -1116,25 +1116,19 @@ impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for ExpectedIdentifier {
|
|||
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, G> {
|
||||
let token_descr = TokenDescription::from_token(&self.token);
|
||||
|
||||
let mut diag = Diag::new(
|
||||
dcx,
|
||||
level,
|
||||
match token_descr {
|
||||
Some(TokenDescription::ReservedIdentifier) => {
|
||||
fluent::parse_expected_identifier_found_reserved_identifier_str
|
||||
}
|
||||
Some(TokenDescription::Keyword) => {
|
||||
fluent::parse_expected_identifier_found_keyword_str
|
||||
}
|
||||
Some(TokenDescription::ReservedKeyword) => {
|
||||
fluent::parse_expected_identifier_found_reserved_keyword_str
|
||||
}
|
||||
Some(TokenDescription::DocComment) => {
|
||||
fluent::parse_expected_identifier_found_doc_comment_str
|
||||
}
|
||||
None => fluent::parse_expected_identifier_found_str,
|
||||
},
|
||||
);
|
||||
let mut diag = Diag::new(dcx, level, match token_descr {
|
||||
Some(TokenDescription::ReservedIdentifier) => {
|
||||
fluent::parse_expected_identifier_found_reserved_identifier_str
|
||||
}
|
||||
Some(TokenDescription::Keyword) => fluent::parse_expected_identifier_found_keyword_str,
|
||||
Some(TokenDescription::ReservedKeyword) => {
|
||||
fluent::parse_expected_identifier_found_reserved_keyword_str
|
||||
}
|
||||
Some(TokenDescription::DocComment) => {
|
||||
fluent::parse_expected_identifier_found_doc_comment_str
|
||||
}
|
||||
None => fluent::parse_expected_identifier_found_str,
|
||||
});
|
||||
diag.span(self.span);
|
||||
diag.arg("token", self.token);
|
||||
|
||||
|
@ -1176,23 +1170,17 @@ impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for ExpectedSemi {
|
|||
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, G> {
|
||||
let token_descr = TokenDescription::from_token(&self.token);
|
||||
|
||||
let mut diag = Diag::new(
|
||||
dcx,
|
||||
level,
|
||||
match token_descr {
|
||||
Some(TokenDescription::ReservedIdentifier) => {
|
||||
fluent::parse_expected_semi_found_reserved_identifier_str
|
||||
}
|
||||
Some(TokenDescription::Keyword) => fluent::parse_expected_semi_found_keyword_str,
|
||||
Some(TokenDescription::ReservedKeyword) => {
|
||||
fluent::parse_expected_semi_found_reserved_keyword_str
|
||||
}
|
||||
Some(TokenDescription::DocComment) => {
|
||||
fluent::parse_expected_semi_found_doc_comment_str
|
||||
}
|
||||
None => fluent::parse_expected_semi_found_str,
|
||||
},
|
||||
);
|
||||
let mut diag = Diag::new(dcx, level, match token_descr {
|
||||
Some(TokenDescription::ReservedIdentifier) => {
|
||||
fluent::parse_expected_semi_found_reserved_identifier_str
|
||||
}
|
||||
Some(TokenDescription::Keyword) => fluent::parse_expected_semi_found_keyword_str,
|
||||
Some(TokenDescription::ReservedKeyword) => {
|
||||
fluent::parse_expected_semi_found_reserved_keyword_str
|
||||
}
|
||||
Some(TokenDescription::DocComment) => fluent::parse_expected_semi_found_doc_comment_str,
|
||||
None => fluent::parse_expected_semi_found_str,
|
||||
});
|
||||
diag.span(self.span);
|
||||
diag.arg("token", self.token);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue