summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-01-07 19:35:40 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-01-11 21:38:56 +0000
commitbb7211702e17dd2d10a6d04962d37331ea032010 (patch)
tree6b72cde588b73b7a22da163fc8fdea13ab66bef1 /compiler/rustc_trait_selection/src
parentce83be4af8462d8d6fadb2829c8ca7f4353fca9e (diff)
downloadrust-bb7211702e17dd2d10a6d04962d37331ea032010.tar.gz
rust-bb7211702e17dd2d10a6d04962d37331ea032010.zip
fix rebase
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
index bcc82004804..7e900fe0034 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
@@ -1451,8 +1451,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
             if let hir::ExprKind::Path(hir::QPath::Resolved(None, path)) = expr.kind
                 && let hir::def::Res::Local(hir_id) = path.res
                 && let Some(hir::Node::Pat(binding)) = self.tcx.hir().find(hir_id)
-                && let parent_hir_id = self.tcx.hir().get_parent_node(binding.hir_id)
-                && let Some(hir::Node::Local(local)) = self.tcx.hir().find(parent_hir_id)
+                && let Some(hir::Node::Local(local)) = self.tcx.hir().find_parent(binding.hir_id)
                 && let None = local.ty
                 && let Some(binding_expr) = local.init
             {