about summary refs log tree commit diff
path: root/compiler/rustc_attr_parsing/src/attributes/semantics.rs
diff options
context:
space:
mode:
authorJonathan Brouwer <jonathantbrouwer@gmail.com>2025-08-09 20:37:48 +0200
committerJonathan Brouwer <jonathantbrouwer@gmail.com>2025-08-14 18:18:22 +0200
commit35e04b67a6eeb1603d67f4220b05da9c1b77eed7 (patch)
tree2d01563a7c2970fad090c450aa0065e9d646b5ab /compiler/rustc_attr_parsing/src/attributes/semantics.rs
parent744d39ebe61ad8cc674797793c743493af078d74 (diff)
downloadrust-35e04b67a6eeb1603d67f4220b05da9c1b77eed7.tar.gz
rust-35e04b67a6eeb1603d67f4220b05da9c1b77eed7.zip
Specify the list of allowed targets per attribute
Diffstat (limited to 'compiler/rustc_attr_parsing/src/attributes/semantics.rs')
-rw-r--r--compiler/rustc_attr_parsing/src/attributes/semantics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_attr_parsing/src/attributes/semantics.rs b/compiler/rustc_attr_parsing/src/attributes/semantics.rs
index 70a8a002099..d4ad861a3a2 100644
--- a/compiler/rustc_attr_parsing/src/attributes/semantics.rs
+++ b/compiler/rustc_attr_parsing/src/attributes/semantics.rs
@@ -2,11 +2,11 @@ use rustc_hir::attrs::AttributeKind;
 use rustc_span::{Span, Symbol, sym};
 
 use crate::attributes::{NoArgsAttributeParser, OnDuplicate};
-use crate::context::Stage;
-
+use crate::context::{ALL_TARGETS, AllowedTargets, Stage};
 pub(crate) struct MayDangleParser;
 impl<S: Stage> NoArgsAttributeParser<S> for MayDangleParser {
     const PATH: &[Symbol] = &[sym::may_dangle];
     const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
+    const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(ALL_TARGETS); //FIXME Still checked fully in `check_attr.rs`
     const CREATE: fn(span: Span) -> AttributeKind = AttributeKind::MayDangle;
 }