get_parent_node_by_hir_id -> get_parent_node

This commit is contained in:
Manish Goregaokar
2019-06-25 14:33:51 -07:00
parent f0edfab44c
commit c47a7e4ef2
12 changed files with 17 additions and 17 deletions

View File

@@ -592,7 +592,7 @@ fn trim_multiline_inner(s: Cow<'_, str>, ignore_first: bool, ch: char) -> Cow<'_
pub fn get_parent_expr<'c>(cx: &'c LateContext<'_, '_>, e: &Expr) -> Option<&'c Expr> {
let map = &cx.tcx.hir();
let hir_id = e.hir_id;
let parent_id = map.get_parent_node_by_hir_id(hir_id);
let parent_id = map.get_parent_node(hir_id);
if hir_id == parent_id {
return None;
}