Skip to content

Commit 547d9ca

Browse files
committed
Rustup
1 parent 141f79f commit 547d9ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_lints/src/escape.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
108108
return;
109109
}
110110
if let Categorization::Rvalue(..) = cmt.cat {
111-
if let Some(NodeStmt(st)) = map.find(map.get_parent_node(cmt.id)) {
111+
let id = map.hir_to_node_id(cmt.hir_id);
112+
if let Some(NodeStmt(st)) = map.find(map.get_parent_node(id)) {
112113
if let StmtDecl(ref decl, _) = st.node {
113114
if let DeclLocal(ref loc) = decl.node {
114115
if let Some(ref ex) = loc.init {

0 commit comments

Comments
 (0)