Skip to content

Commit cbe263b

Browse files
committed
Delete unused variant and document AttributeKind
1 parent cb31a00 commit cbe263b

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

compiler/rustc_attr_data_structures/src/attributes.rs

+23-19
Original file line numberDiff line numberDiff line change
@@ -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)]
6961
pub enum ReprAttr {
7062
ReprInt(IntType),
@@ -160,37 +152,49 @@ impl Deprecation {
160152
#[derive(Clone, Debug, HashStable_Generic, Encodable, Decodable, PrintAttribute)]
161153
pub 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]` and `#[unstable]`.
194198
Stability {
195199
stability: Stability,
196200
/// Span of the `#[stable(...)]` or `#[unstable(...)]` attribute

0 commit comments

Comments
 (0)