diff options
| author | Jana Dönszelmann <jonathan@donsz.nl> | 2025-06-21 15:32:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-21 15:32:05 +0200 |
| commit | cd857f4bef3e27717a1a954fdeaec270f16f3c8f (patch) | |
| tree | e9807ef052b8e947b97c9e09393e10bc2356aaed /compiler/rustc_attr_data_structures/src | |
| parent | 6d0c9e2a1c80e350c50f5fb9338ea9e585ec603b (diff) | |
| parent | 045faa8c5c27e0506b1dfdd3cc06840f0a059513 (diff) | |
| download | rust-cd857f4bef3e27717a1a954fdeaec270f16f3c8f.tar.gz rust-cd857f4bef3e27717a1a954fdeaec270f16f3c8f.zip | |
Rollup merge of #142539 - GrigorenkoPV:attributes/may_dangle, r=jdonszelmann
Port `#[may_dangle]` to the new attribute system Very similar to rust-lang/rust#142498. This is a part of rust-lang/rust#131229, so r? `@jdonszelmann`
Diffstat (limited to 'compiler/rustc_attr_data_structures/src')
| -rw-r--r-- | compiler/rustc_attr_data_structures/src/attributes.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_attr_data_structures/src/attributes.rs b/compiler/rustc_attr_data_structures/src/attributes.rs index 9ebf4c1793d..066e3e9eceb 100644 --- a/compiler/rustc_attr_data_structures/src/attributes.rs +++ b/compiler/rustc_attr_data_structures/src/attributes.rs @@ -233,8 +233,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)>), |
