Implement .use keyword as an alias of clone

This commit is contained in:
Santiago Pastorino
2024-10-02 16:35:37 -03:00
parent 0cf8dbc96c
commit 05c516446a
36 changed files with 247 additions and 24 deletions

View File

@@ -106,6 +106,19 @@ pub(crate) struct IncorrectUseOfAwait {
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(parse_incorrect_use_of_use)]
pub(crate) struct IncorrectUseOfUse {
#[primary_span]
#[suggestion(
parse_parentheses_suggestion,
style = "verbose",
code = "",
applicability = "machine-applicable"
)]
pub span: Span,
}
#[derive(Subdiagnostic)]
#[multipart_suggestion(
parse_incorrect_use_of_await_postfix_suggestion,