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 12:37:32 +0100
committerLéo Lanteri Thauvin <leseulartichaut@gmail.com>2023-03-12 14:57:38 +0100
commitdb266939822a5a89473871abff6beea39b083af6 (patch)
tree29377abd03b135ff72e6507441ac643b18f22150 /compiler/rustc_hir_analysis/src/errors.rs
parent24c0b81c1fd5de8e00276524896d3352ed91a8cb (diff)
downloadrust-db266939822a5a89473871abff6beea39b083af6.tar.gz
rust-db266939822a5a89473871abff6beea39b083af6.zip
Forbid the use of `#[target_feature]` on `main`
Diffstat (limited to 'compiler/rustc_hir_analysis/src/errors.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/errors.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/errors.rs b/compiler/rustc_hir_analysis/src/errors.rs
index 8a697b4c514..5b445ead1d3 100644
--- a/compiler/rustc_hir_analysis/src/errors.rs
+++ b/compiler/rustc_hir_analysis/src/errors.rs
@@ -328,6 +328,14 @@ pub(crate) struct TrackCallerOnMain {
 }
 
 #[derive(Diagnostic)]
+#[diag(hir_analysis_target_feature_on_main)]
+pub(crate) struct TargetFeatureOnMain {
+    #[primary_span]
+    #[label(hir_analysis_target_feature_on_main)]
+    pub main: Span,
+}
+
+#[derive(Diagnostic)]
 #[diag(hir_analysis_start_not_track_caller)]
 pub(crate) struct StartTrackCaller {
     #[primary_span]