mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-17 18:28:40 +00:00
Update the DefLocal pattern
DefLocal now contains a DefId too, since rust-lang/rust@a0dc2d9a29.
This commit is contained in:
parent
147d3f5dff
commit
846602a876
1 changed files with 1 additions and 1 deletions
|
@ -501,7 +501,7 @@ impl<'v, 't> Visitor<'v> for InitializeVisitor<'v, 't> {
|
|||
|
||||
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 a new issue