From ec82bc199611e7f1cf3acd612a65eed81d22636b Mon Sep 17 00:00:00 2001 From: Cameron Steffen Date: Tue, 28 Jun 2022 13:15:30 -0500 Subject: Factor out hir::Node::Binding --- compiler/rustc_const_eval/src/interpret/validity.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_const_eval/src') diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index 905ab6cb578..847694cbd10 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -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); } -- cgit 1.4.1-3-g733a5