Update the DefLocal pattern

DefLocal now contains a DefId too, since rust-lang/rust@a0dc2d9a29.
This commit is contained in:
Josh Stone 2015-10-02 11:07:56 -07:00
parent 147d3f5dff
commit 846602a876

View File

@ -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)
}
}