Skip to content

Commit e36c6d1

Browse files
committed
Merge pull request #361 from cuviper/deflocal
Update the DefLocal pattern
2 parents 147d3f5 + 846602a commit e36c6d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/loops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ impl<'v, 't> Visitor<'v> for InitializeVisitor<'v, 't> {
501501

502502
fn var_def_id(cx: &LateContext, expr: &Expr) -> Option<NodeId> {
503503
if let Some(path_res) = cx.tcx.def_map.borrow().get(&expr.id) {
504-
if let DefLocal(node_id) = path_res.base_def {
504+
if let DefLocal(_, node_id) = path_res.base_def {
505505
return Some(node_id)
506506
}
507507
}

0 commit comments

Comments
 (0)