Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7319c1a

Browse files
committedJan 20, 2025··
Fix all tests
1 parent 4d38c0b commit 7319c1a

File tree

63 files changed

+552
-673
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+552
-673
lines changed
 

‎compiler/rustc_attr_data_structures/src/attributes.rs

Lines changed: 5 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ pub enum ReprAttr {
6262
ReprSimd,
6363
ReprTransparent,
6464
ReprAlign(Align),
65+
// this one is just so we can emit a lint for it
66+
ReprEmpty,
6567
}
6668
pub use ReprAttr::*;
6769

@@ -139,26 +141,16 @@ impl Deprecation {
139141
/// happen.
140142
///
141143
/// For more docs, look in [`rustc_attr`](https://doc.rust-lang.org/stable/nightly-rustc/rustc_attr/index.html)
142-
// FIXME(jdonszelmann): rename to AttributeKind once hir::AttributeKind is dissolved
143144
#[derive(Clone, Debug, HashStable_Generic, Encodable, Decodable)]
144145
pub enum AttributeKind {
145146
// tidy-alphabetical-start
146-
Allow,
147147
AllowConstFnUnstable(ThinVec<Symbol>),
148-
AllowInternalUnsafe,
149-
AllowInternalUnstable(ThinVec<Symbol>),
150-
AutoDiff,
151-
AutomaticallyDerived,
148+
AllowInternalUnstable(ThinVec<(Symbol, Span)>),
152149
BodyStability {
153150
stability: DefaultBodyStability,
154151
/// Span of the `#[rustc_default_body_unstable(...)]` attribute
155152
span: Span,
156153
},
157-
Cfg,
158-
CfgAttr,
159-
CfiEncoding, // FIXME(cfi_encoding)
160-
Cold,
161-
CollapseDebuginfo,
162154
Confusables {
163155
symbols: ThinVec<Symbol>,
164156
// FIXME(jdonszelmann): remove when target validation code is moved
@@ -170,14 +162,6 @@ pub enum AttributeKind {
170162
span: Span,
171163
},
172164
ConstStabilityIndirect,
173-
ConstTrait,
174-
Coroutine,
175-
Coverage,
176-
CustomMir,
177-
DebuggerVisualizer,
178-
DefaultLibAllocator,
179-
Deny,
180-
DeprecatedSafe, // FIXME(deprecated_safe)
181165
Deprecation {
182166
deprecation: Deprecation,
183167
span: Span,
@@ -193,57 +177,12 @@ pub enum AttributeKind {
193177
span: Span,
194178
comment: Symbol,
195179
},
196-
Expect,
197-
ExportName,
198-
FfiConst,
199-
FfiPure,
200-
Forbid,
201-
Fundamental,
202-
Ignore,
203-
// TODO: must contain span for clippy
204-
Inline,
205-
InstructionSet, // broken on stable!!!
206-
Lang,
207-
Link,
208-
Linkage,
209-
LinkName,
210-
LinkOrdinal,
211-
LinkSection,
212-
MacroExport,
213180
MacroTransparency(Transparency),
214-
MacroUse,
215-
Marker,
216-
MayDangle,
217-
MustNotSuspend,
218-
MustUse,
219-
NeedsAllocator,
220-
NoImplicitPrelude,
221-
NoLink,
222-
NoMangle,
223-
NonExhaustive,
224-
NoSanitize,
225-
OmitGdbPrettyPrinterSection, // FIXME(omit_gdb_pretty_printer_section)
226-
PanicHandler,
227-
PatchableFunctionEntry, // FIXME(patchable_function_entry)
228-
Path,
229-
Pointee, // FIXME(derive_smart_pointer)
230-
PreludeImport,
231-
ProcMacro,
232-
ProcMacroAttribute,
233-
ProcMacroDerive,
234-
Repr(ThinVec<ReprAttr>),
181+
Repr(ThinVec<(ReprAttr, Span)>),
235182
Stability {
236183
stability: Stability,
237184
/// Span of the `#[stable(...)]` or `#[unstable(...)]` attribute
238185
span: Span,
239186
},
240-
Start,
241-
TargetFeature,
242-
ThreadLocal,
243-
TrackCaller,
244-
Unstable,
245-
Used,
246-
Warn,
247-
WindowsSubsystem, // broken on stable!!!
248-
// tidy-alphabetical-end
187+
// tidy-alphabetical-end
249188
}

‎compiler/rustc_attr_parsing/messages.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ attr_parsing_non_ident_feature =
9292
9393
attr_parsing_repr_ident =
9494
meta item in `repr` must be an identifier
95+
9596
attr_parsing_rustc_allowed_unstable_pairing =
9697
`rustc_allowed_through_unstable_modules` attribute must be paired with a `stable` attribute
9798

0 commit comments

Comments
 (0)
Please sign in to comment.