merge diagnostics about incorrect uses of .await

This commit is contained in:
Christian Poveda 2022-05-31 15:07:44 -05:00
parent a06ba45487
commit 9ce04e3783
No known key found for this signature in database
GPG key ID: 27525EF5E7420A50
2 changed files with 5 additions and 9 deletions

View file

@ -310,16 +310,16 @@ struct IncorrectSemicolon<'a> {
#[error(slug = "parser-incorrect-use-of-await")]
struct IncorrectUseOfAwait {
#[primary_span]
#[suggestion(applicability = "machine-applicable")]
#[suggestion(message = "parentheses-suggestion", applicability = "machine-applicable")]
span: Span,
}
#[derive(SessionDiagnostic)]
#[error(slug = "parser-incorrect-await")]
#[error(slug = "parser-incorrect-use-of-await")]
struct IncorrectAwait {
#[primary_span]
span: Span,
#[suggestion(code = "{expr}.await{question_mark}")]
#[suggestion(message = "postfix-suggestion", code = "{expr}.await{question_mark}")]
sugg_span: (Span, Applicability),
expr: String,
question_mark: &'static str,