Reformat using the new identifier sorting from rustfmt
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user