about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2024-10-02 16:35:37 -0300
committerSantiago Pastorino <spastorino@gmail.com>2025-03-06 17:58:32 -0300
commit05c516446a0f6105ce695da00d5cf5a0eb54e808 (patch)
treed83371138f5b6dc54c0b7122227b209c68cac931 /compiler/rustc_parse/src/errors.rs
parent0cf8dbc96c7c3c454779fe59e8e7019a3e37d5b6 (diff)
downloadrust-05c516446a0f6105ce695da00d5cf5a0eb54e808.tar.gz
rust-05c516446a0f6105ce695da00d5cf5a0eb54e808.zip
Implement .use keyword as an alias of clone
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
-rw-r--r--compiler/rustc_parse/src/errors.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs
index 8d2fd595942..d89bb1451b6 100644
--- a/compiler/rustc_parse/src/errors.rs
+++ b/compiler/rustc_parse/src/errors.rs
@@ -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,