@@ -57,14 +57,6 @@ impl OptimizeAttr {
5757 }
5858}
5959
60- #[ derive( Clone , Debug , Encodable , Decodable , HashStable_Generic , PrintAttribute ) ]
61- pub enum DiagnosticAttribute {
62- // tidy-alphabetical-start
63- DoNotRecommend ,
64- OnUnimplemented ,
65- // tidy-alphabetical-end
66- }
67-
6860#[ derive( PartialEq , Debug , Encodable , Decodable , Copy , Clone , HashStable_Generic , PrintAttribute ) ]
6961pub enum ReprAttr {
7062 ReprInt ( IntType ) ,
@@ -160,40 +152,52 @@ impl Deprecation {
160152#[ derive( Clone , Debug , HashStable_Generic , Encodable , Decodable , PrintAttribute ) ]
161153pub enum AttributeKind {
162154 // tidy-alphabetical-start
155+ /// Represents `#[rustc_allow_const_fn_unstable]`.
163156 AllowConstFnUnstable ( ThinVec < Symbol > ) ,
157+
158+ /// Represents `#[allow_internal_unstable]`.
164159 AllowInternalUnstable ( ThinVec < ( Symbol , Span ) > ) ,
160+
161+ /// Represents `#[rustc_default_body_unstable]`.
165162 BodyStability {
166163 stability : DefaultBodyStability ,
167164 /// Span of the `#[rustc_default_body_unstable(...)]` attribute
168165 span : Span ,
169166 } ,
167+
168+ /// Represents `#[rustc_confusables]`.
170169 Confusables {
171170 symbols : ThinVec < Symbol > ,
172171 // FIXME(jdonszelmann): remove when target validation code is moved
173172 first_span : Span ,
174173 } ,
174+
175+ /// Represents `#[rustc_const_stable]` and `#[rustc_const_unstable]`.
175176 ConstStability {
176177 stability : PartialConstStability ,
177178 /// Span of the `#[rustc_const_stable(...)]` or `#[rustc_const_unstable(...)]` attribute
178179 span : Span ,
179180 } ,
181+
182+ /// Represents `#[rustc_const_stable_indirect]`.
180183 ConstStabilityIndirect ,
181- Deprecation {
182- deprecation : Deprecation ,
183- span : Span ,
184- } ,
185- Diagnostic ( DiagnosticAttribute ) ,
186- DocComment {
187- style : AttrStyle ,
188- kind : CommentKind ,
189- span : Span ,
190- comment : Symbol ,
191- } ,
184+
185+ /// Represents [`#[deprecated]`](https://doc.rust-lang.org/stable/reference/attributes/diagnostics.html#the-deprecated-attribute).
186+ Deprecation { deprecation : Deprecation , span : Span } ,
187+
188+ /// Represents [`#[doc]`](https://doc.rust-lang.org/stable/rustdoc/write-documentation/the-doc-attribute.html).
189+ DocComment { style : AttrStyle , kind : CommentKind , span : Span , comment : Symbol } ,
190+
191+ /// Represents `#[rustc_macro_transparency]`.
192192 MacroTransparency ( Transparency ) ,
193+
194+ /// Represents [`#[repr]`](https://doc.rust-lang.org/stable/reference/type-layout.html#representations).
193195 Repr ( ThinVec < ( ReprAttr , Span ) > ) ,
196+
197+ /// Represents `#[stable]`, `#[unstable]` and `#[rustc_allowed_through_unstable_modules]`.
194198 Stability {
195199 stability : Stability ,
196- /// Span of the `#[stable(...)]` or `#[unstable(...)]` attribute
200+ /// Span of the attribute.
197201 span : Span ,
198202 } ,
199203 // tidy-alphabetical-end
0 commit comments