Skip to content

Commit a9a4c8e

Browse files
committed
Auto merge of #5467 - matthiaskrgr:rustup_43, r=flip1995
rustup rust-lang/rust#71116 changelog: none
2 parents c496f4e + a353f0f commit a9a4c8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_lints/src/utils/author.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Author {
9797
return;
9898
}
9999
prelude();
100-
PrintVisitor::new("var").visit_variant(var, &hir::Generics::empty(), hir::DUMMY_HIR_ID);
100+
let parent_hir_id = cx.tcx.hir().get_parent_node(var.id);
101+
PrintVisitor::new("var").visit_variant(var, &hir::Generics::empty(), parent_hir_id);
101102
done();
102103
}
103104

0 commit comments

Comments
 (0)