Skip to content

Commit 0fc0057

Browse files
committed
Fix: Add a span to AttributeKind::PinV2
1 parent 334ed47 commit 0fc0057

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

compiler/rustc_attr_parsing/src/attributes/pin_v2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ impl NoArgsAttributeParser for PinV2Parser {
1515
Allow(Target::Struct),
1616
Allow(Target::Union),
1717
]);
18-
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::PinV2;
18+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::PinV2;
1919
}

compiler/rustc_hir/src/attrs/data_structures.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ pub enum AttributeKind {
12121212
},
12131213

12141214
/// Represents `#[pin_v2]`
1215-
PinV2,
1215+
PinV2(Span),
12161216

12171217
/// Represents `#[prelude_import]`
12181218
PreludeImport,

compiler/rustc_hir/src/attrs/encode_cross_crate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl AttributeKind {
8686
PatchableFunctionEntry { .. } => Yes,
8787
Path(..) => No,
8888
PatternComplexityLimit { .. } => No,
89-
PinV2 => Yes,
89+
PinV2(..) => Yes,
9090
PreludeImport => No,
9191
ProcMacro => No,
9292
ProcMacroAttribute => No,

compiler/rustc_middle/src/ty/adt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ impl AdtDefData {
349349
debug!("found non-exhaustive variant list for {:?}", did);
350350
flags = flags | AdtFlags::IS_VARIANT_LIST_NON_EXHAUSTIVE;
351351
}
352-
if find_attr!(tcx, did, PinV2) {
352+
if find_attr!(tcx, did, PinV2(..)) {
353353
debug!("found pin-project type {:?}", did);
354354
flags |= AdtFlags::IS_PIN_PROJECT;
355355
}

compiler/rustc_passes/src/check_attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
259259
| AttributeKind::PatchableFunctionEntry { .. }
260260
| AttributeKind::Path(..)
261261
| AttributeKind::PatternComplexityLimit { .. }
262-
| AttributeKind::PinV2
262+
| AttributeKind::PinV2(..)
263263
| AttributeKind::PreludeImport
264264
| AttributeKind::ProfilerRuntime
265265
| AttributeKind::RecursionLimit { .. }

0 commit comments

Comments
 (0)