Update the DefLocal pattern
DefLocal now contains a DefId too, since rust-lang/rust@a0dc2d9a29.
This commit is contained in:
parent
147d3f5dff
commit
846602a876
@ -501,7 +501,7 @@ fn visit_expr(&mut self, expr: &'v Expr) {
|
||||
|
||||
fn var_def_id(cx: &LateContext, expr: &Expr) -> Option<NodeId> {
|
||||
if let Some(path_res) = cx.tcx.def_map.borrow().get(&expr.id) {
|
||||
if let DefLocal(node_id) = path_res.base_def {
|
||||
if let DefLocal(_, node_id) = path_res.base_def {
|
||||
return Some(node_id)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user