diff --git a/clippy_lints/src/utils/author.rs b/clippy_lints/src/utils/author.rs index 5f72559f1..74601008d 100644 --- a/clippy_lints/src/utils/author.rs +++ b/clippy_lints/src/utils/author.rs @@ -97,8 +97,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Author { return; } prelude(); - let dummy_hir_id = cx.tcx.hir().get_parent_node(var.id); - PrintVisitor::new("var").visit_variant(var, &hir::Generics::empty(), dummy_hir_id); + let parent_hir_id = cx.tcx.hir().get_parent_node(var.id); + PrintVisitor::new("var").visit_variant(var, &hir::Generics::empty(), parent_hir_id); done(); }