about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/errors.rs
diff options
context:
space:
mode:
authorJonathan Brouwer <jonathantbrouwer@gmail.com>2025-06-25 09:47:48 +0200
committerJonathan Brouwer <jonathantbrouwer@gmail.com>2025-07-03 07:54:19 +0200
commit3d5d72b76105056af5886cbad4661a26f9409b8e (patch)
treed6052fe37acd26146cbd4b060ca9b323089180bc /compiler/rustc_codegen_ssa/src/errors.rs
parent25face9808491588e59b6d7844f2185b09eef479 (diff)
downloadrust-3d5d72b76105056af5886cbad4661a26f9409b8e.tar.gz
rust-3d5d72b76105056af5886cbad4661a26f9409b8e.zip
Port `#[target_feature]` to the new attribute parsing infrastructure
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/errors.rs')
-rw-r--r--compiler/rustc_codegen_ssa/src/errors.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/errors.rs b/compiler/rustc_codegen_ssa/src/errors.rs
index 1950a35b364..086c069745c 100644
--- a/compiler/rustc_codegen_ssa/src/errors.rs
+++ b/compiler/rustc_codegen_ssa/src/errors.rs
@@ -1292,3 +1292,14 @@ pub(crate) struct NoMangleNameless {
     pub span: Span,
     pub definition: String,
 }
+
+#[derive(Diagnostic)]
+#[diag(codegen_ssa_feature_not_valid)]
+pub(crate) struct FeatureNotValid<'a> {
+    pub feature: &'a str,
+    #[primary_span]
+    #[label]
+    pub span: Span,
+    #[help]
+    pub plus_hint: bool,
+}