1
Fork 0

rename get_parent_node to parent_id

This commit is contained in:
Michael Goulet 2023-01-03 07:31:04 +00:00
parent c7572670a1
commit a313ef05a7
48 changed files with 119 additions and 121 deletions

View file

@ -1526,7 +1526,7 @@ impl<'tcx> LateLintPass<'tcx> for UnreachablePub {
fn check_field_def(&mut self, cx: &LateContext<'_>, field: &hir::FieldDef<'_>) {
let map = cx.tcx.hir();
if matches!(map.get(map.get_parent_node(field.hir_id)), Node::Variant(_)) {
if matches!(map.get(map.parent_id(field.hir_id)), Node::Variant(_)) {
return;
}
self.perform_lint(cx, "field", field.def_id, field.vis_span, false);