mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Use HirId
instead of NodeId
for lookup
This commit is contained in:
parent
8a59f81180
commit
a457258132
@ -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 New Issue
Block a user