Factor out hir::Node::Binding
This commit is contained in:
parent
ca1e68b322
commit
ec82bc1996
18 changed files with 22 additions and 37 deletions
|
@ -244,7 +244,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
|
|||
// for a generator).
|
||||
let var_hir_id = captured_place.get_root_variable();
|
||||
let node = self.ecx.tcx.hir().get(var_hir_id);
|
||||
if let hir::Node::Binding(pat) = node {
|
||||
if let hir::Node::Pat(pat) = node {
|
||||
if let hir::PatKind::Binding(_, _, ident, _) = pat.kind {
|
||||
name = Some(ident.name);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue