hir: Remove hir::Map::{opt_parent_id,parent_id,get_parent,find_parent}
This commit is contained in:
parent
e46e3e7107
commit
b07283815b
78 changed files with 233 additions and 318 deletions
|
@ -1416,8 +1416,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_parent(field.hir_id), Node::Variant(_)) {
|
||||
if matches!(cx.tcx.parent_hir_node(field.hir_id), Node::Variant(_)) {
|
||||
return;
|
||||
}
|
||||
self.perform_lint(cx, "field", field.def_id, field.vis_span, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue