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_hir/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_hir/src')
| -rw-r--r-- | compiler/rustc_hir/src/hir.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index 556f50a85af..1a526d5bce0 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -1302,6 +1302,7 @@ impl AttributeExt for Attribute { // FIXME: should not be needed anymore when all attrs are parsed Attribute::Parsed(AttributeKind::Deprecation { span, .. }) => *span, Attribute::Parsed(AttributeKind::DocComment { span, .. }) => *span, + Attribute::Parsed(AttributeKind::MayDangle(span)) => *span, a => panic!("can't get the span of an arbitrary parsed attribute: {a:?}"), } } |
