about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2023-02-27 13:17:29 +0000
committerclubby789 <jamie@hill-daniel.co.uk>2023-03-12 13:19:46 +0000
commit0932452fa40178b6f8b93a2bab3b4ead4e2bb560 (patch)
tree640a6f9236a494096b535bffd7bbb30f1f62318e /compiler/rustc_parse/src/errors.rs
parentdd7df04e168324fc002ab4985b6c7513f08ccf49 (diff)
downloadrust-0932452fa40178b6f8b93a2bab3b4ead4e2bb560.tar.gz
rust-0932452fa40178b6f8b93a2bab3b4ead4e2bb560.zip
Remove `box_syntax` from AST and use in tools
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 63e5bc50513..af0c3026c66 100644
--- a/compiler/rustc_parse/src/errors.rs
+++ b/compiler/rustc_parse/src/errors.rs
@@ -2300,3 +2300,16 @@ impl HelpUseLatestEdition {
         }
     }
 }
+
+#[derive(Diagnostic)]
+#[diag(parse_box_syntax_removed)]
+pub struct BoxSyntaxRemoved<'a> {
+    #[primary_span]
+    #[suggestion(
+        code = "Box::new({code})",
+        applicability = "machine-applicable",
+        style = "verbose"
+    )]
+    pub span: Span,
+    pub code: &'a str,
+}