merge diagnostics about incorrect uses of .await
This commit is contained in:
parent
a06ba45487
commit
9ce04e3783
2 changed files with 5 additions and 9 deletions
|
@ -26,9 +26,5 @@ parser-incorrect-semicolon =
|
|||
|
||||
parser-incorrect-use-of-await =
|
||||
incorrect use of `await`
|
||||
.suggestion = `await` is not a method call, remove the parentheses
|
||||
|
||||
|
||||
parser-incorrect-await =
|
||||
incorrect use of `await`
|
||||
.suggestion = `await` is a postfix operation
|
||||
.parentheses-suggestion = `await` is not a method call, remove the parentheses
|
||||
.postfix-suggestion = `await` is a postfix operation
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue