]> git.lizzy.rs Git - rust.git/commitdiff
fix rebase
authorEsteban Küber <esteban@kuber.com.ar>
Sat, 7 Jan 2023 19:35:40 +0000 (19:35 +0000)
committerEsteban Küber <esteban@kuber.com.ar>
Wed, 11 Jan 2023 21:38:56 +0000 (21:38 +0000)
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

index bcc8200480497732b3e6afa63ab66fce033e4b38..7e900fe0034b463c10972f3f6c5039d889b3f71d 100644 (file)
@@ -1451,8 +1451,7 @@ fn suggest_remove_reference(
             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
             {