Skip to content

Commit 2f34c33

Browse files
committed
Fix dogfood failure
1 parent 19ec7b9 commit 2f34c33

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/static_items_large_align.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,14 @@ impl LateLintPass<'_> for StaticItemsLargeAlign {
4747
if let ItemKind::Static(hir_ty, _, _) = item.kind;
4848
let ty = hir_ty_to_ty(cx.tcx, hir_ty);
4949
if let Some(adt_ref) = self.check_ty_alignment(cx.tcx, ty);
50-
let def_span = cx.tcx.def_span(adt_ref.did());
5150
then {
5251
span_lint_and_note(
5352
cx,
5453
STATIC_ITEMS_LARGE_ALIGN,
5554
item.span,
5655
"this static item (itself or its subfield) has large type alignment, which may not be fulfilled,\n\
5756
for more information, see <https://github.com/rust-lang/rust/issues/70022>",
58-
Some(def_span),
57+
Some(cx.tcx.def_span(adt_ref.did())),
5958
format!("this type has an alignment larger than page size ({}KB)", self.page_size/1024).as_str()
6059
);
6160
}

0 commit comments

Comments
 (0)