about summary refs log tree commit diff
path: root/compiler/rustc_borrowck
diff options
context:
space:
mode:
authorCameron Steffen <cam.steffen94@gmail.com>2022-06-28 13:15:30 -0500
committerCameron Steffen <cam.steffen94@gmail.com>2022-07-01 10:04:19 -0500
commitec82bc199611e7f1cf3acd612a65eed81d22636b (patch)
tree370d40d9dfc6d84175cb8c0679fe7cd712e186f2 /compiler/rustc_borrowck
parentca1e68b3229e710c3948a361ee770d846a88e6da (diff)
downloadrust-ec82bc199611e7f1cf3acd612a65eed81d22636b.tar.gz
rust-ec82bc199611e7f1cf3acd612a65eed81d22636b.zip
Factor out hir::Node::Binding
Diffstat (limited to 'compiler/rustc_borrowck')
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
index 49b24a05071..3c5dd32d281 100644
--- a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
@@ -362,7 +362,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
 
                 let upvar_hir_id = captured_place.get_root_variable();
 
-                if let Some(Node::Binding(pat)) = self.infcx.tcx.hir().find(upvar_hir_id)
+                if let Some(Node::Pat(pat)) = self.infcx.tcx.hir().find(upvar_hir_id)
                     && let hir::PatKind::Binding(
                         hir::BindingAnnotation::Unannotated,
                         _,