fix rebase

This commit is contained in:
Esteban Küber 2023-01-07 19:35:40 +00:00
parent ce83be4af8
commit bb7211702e

View 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
{