From 045faa8c5c27e0506b1dfdd3cc06840f0a059513 Mon Sep 17 00:00:00 2001 From: Pavel Grigorenko Date: Sun, 15 Jun 2025 16:50:37 +0300 Subject: Port `#[may_dangle]` to the new attribute system --- compiler/rustc_attr_data_structures/src/attributes.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/rustc_attr_data_structures/src') diff --git a/compiler/rustc_attr_data_structures/src/attributes.rs b/compiler/rustc_attr_data_structures/src/attributes.rs index 65061059a02..b2c4b53f94f 100644 --- a/compiler/rustc_attr_data_structures/src/attributes.rs +++ b/compiler/rustc_attr_data_structures/src/attributes.rs @@ -230,8 +230,13 @@ pub enum AttributeKind { /// Represents `#[rustc_macro_transparency]`. MacroTransparency(Transparency), + + /// Represents [`#[may_dangle]`](https://std-dev-guide.rust-lang.org/tricky/may-dangle.html). + MayDangle(Span), + /// Represents `#[optimize(size|speed)]` Optimize(OptimizeAttr, Span), + /// Represents [`#[repr]`](https://doc.rust-lang.org/stable/reference/type-layout.html#representations). Repr(ThinVec<(ReprAttr, Span)>), -- cgit 1.4.1-3-g733a5