mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Use HirId
instead of NodeId
for lookup
This commit is contained in:
parent
8a59f81180
commit
a457258132
1 changed files with 1 additions and 2 deletions
|
@ -122,8 +122,7 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if let Categorization::Rvalue(..) = cmt.cat {
|
if let Categorization::Rvalue(..) = cmt.cat {
|
||||||
let id = map.hir_to_node_id(cmt.hir_id);
|
if let Some(Node::Stmt(st)) = map.find_by_hir_id(map.get_parent_node_by_hir_id(cmt.hir_id)) {
|
||||||
if let Some(Node::Stmt(st)) = map.find(map.get_parent_node(id)) {
|
|
||||||
if let StmtKind::Local(ref loc) = st.node {
|
if let StmtKind::Local(ref loc) = st.node {
|
||||||
if let Some(ref ex) = loc.init {
|
if let Some(ref ex) = loc.init {
|
||||||
if let ExprKind::Box(..) = ex.node {
|
if let ExprKind::Box(..) = ex.node {
|
||||||
|
|
Loading…
Reference in a new issue