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_borrowck/src | |
| parent | ca1e68b3229e710c3948a361ee770d846a88e6da (diff) | |
| download | rust-ec82bc199611e7f1cf3acd612a65eed81d22636b.tar.gz rust-ec82bc199611e7f1cf3acd612a65eed81d22636b.zip | |
Factor out hir::Node::Binding
Diffstat (limited to 'compiler/rustc_borrowck/src')
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs | 2 |
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, _, |
