about summary refs log tree commit diff
path: root/compiler/rustc_attr_data_structures/src
diff options
context:
space:
mode:
authorJonathan Dönszelmann <jonathan@donsz.nl>2025-02-06 16:02:11 +0100
committerJana Dönszelmann <jana@donsz.nl>2025-06-17 23:19:31 +0200
commit4f73cd0a6c7be3f706aee29090a6d91c17ca53bc (patch)
tree4c45c36c26863508d3148c75a99198b555c98328 /compiler/rustc_attr_data_structures/src
parentf3db63916e541ff039ac3cd7364c2d612749b61b (diff)
downloadrust-4f73cd0a6c7be3f706aee29090a6d91c17ca53bc.tar.gz
rust-4f73cd0a6c7be3f706aee29090a6d91c17ca53bc.zip
implement inline parser
Diffstat (limited to 'compiler/rustc_attr_data_structures/src')
-rw-r--r--compiler/rustc_attr_data_structures/src/attributes.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/compiler/rustc_attr_data_structures/src/attributes.rs b/compiler/rustc_attr_data_structures/src/attributes.rs
index 8f95a017809..4c7e91528b9 100644
--- a/compiler/rustc_attr_data_structures/src/attributes.rs
+++ b/compiler/rustc_attr_data_structures/src/attributes.rs
@@ -8,7 +8,7 @@ use thin_vec::ThinVec;
 
 use crate::{DefaultBodyStability, PartialConstStability, PrintAttribute, RustcVersion, Stability};
 
-#[derive(Copy, Clone, PartialEq, Encodable, Decodable, Debug, HashStable_Generic)]
+#[derive(Copy, Clone, PartialEq, Encodable, Decodable, Debug, HashStable_Generic, PrintAttribute)]
 pub enum InlineAttr {
     None,
     Hint,
@@ -216,12 +216,21 @@ pub enum AttributeKind {
     ConstStabilityIndirect,
 
     /// Represents [`#[deprecated]`](https://doc.rust-lang.org/stable/reference/attributes/diagnostics.html#the-deprecated-attribute).
-    Deprecation { deprecation: Deprecation, span: Span },
+    Deprecation {
+        deprecation: Deprecation,
+        span: Span,
+    },
 
     /// Represents [`#[doc]`](https://doc.rust-lang.org/stable/rustdoc/write-documentation/the-doc-attribute.html).
-    DocComment { style: AttrStyle, kind: CommentKind, span: Span, comment: Symbol },
+    DocComment {
+        style: AttrStyle,
+        kind: CommentKind,
+        span: Span,
+        comment: Symbol,
+    },
 
     /// Represents `#[rustc_macro_transparency]`.
+    Inline(InlineAttr, Span),
     MacroTransparency(Transparency),
 
     /// Represents [`#[repr]`](https://doc.rust-lang.org/stable/reference/type-layout.html#representations).