diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2022-06-28 13:15:30 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2022-07-01 10:04:19 -0500 |
| commit | ec82bc199611e7f1cf3acd612a65eed81d22636b (patch) | |
| tree | 370d40d9dfc6d84175cb8c0679fe7cd712e186f2 /compiler/rustc_const_eval/src | |
| parent | ca1e68b3229e710c3948a361ee770d846a88e6da (diff) | |
| download | rust-ec82bc199611e7f1cf3acd612a65eed81d22636b.tar.gz rust-ec82bc199611e7f1cf3acd612a65eed81d22636b.zip | |
Factor out hir::Node::Binding
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/validity.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |
