Skip to content

Commit 7215495

Browse files
committed
1 parent c496f4e commit 7215495

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 dummy_hir_id = cx.tcx.hir().get_parent_node(var.id);
101+
PrintVisitor::new("var").visit_variant(var, &hir::Generics::empty(), dummy_hir_id);
101102
done();
102103
}
103104

0 commit comments

Comments
 (0)