about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/errors.rs
diff options
context:
space:
mode:
authorLéo Lanteri Thauvin <leseulartichaut@gmail.com>2023-03-02 14:26:12 +0100
committerLéo Lanteri Thauvin <leseulartichaut@gmail.com>2023-03-12 14:57:38 +0100
commit963305bda8723a461afe37ddb7fc6da9f56bf100 (patch)
treeb0b84f5a2497868a154ebc2ed8892eb53cced116 /compiler/rustc_hir_analysis/src/errors.rs
parentdb266939822a5a89473871abff6beea39b083af6 (diff)
downloadrust-963305bda8723a461afe37ddb7fc6da9f56bf100.tar.gz
rust-963305bda8723a461afe37ddb7fc6da9f56bf100.zip
Forbid the use of `#[target_feature]` on `start`
Diffstat (limited to 'compiler/rustc_hir_analysis/src/errors.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/errors.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/errors.rs b/compiler/rustc_hir_analysis/src/errors.rs
index 5b445ead1d3..f57197edeb7 100644
--- a/compiler/rustc_hir_analysis/src/errors.rs
+++ b/compiler/rustc_hir_analysis/src/errors.rs
@@ -345,6 +345,15 @@ pub(crate) struct StartTrackCaller {
 }
 
 #[derive(Diagnostic)]
+#[diag(hir_analysis_start_not_target_feature)]
+pub(crate) struct StartTargetFeature {
+    #[primary_span]
+    pub span: Span,
+    #[label]
+    pub start: Span,
+}
+
+#[derive(Diagnostic)]
 #[diag(hir_analysis_start_not_async, code = "E0752")]
 pub(crate) struct StartAsync {
     #[primary_span]