diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 9ace6b13a01b..28947be5128c 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs @@ -489,8 +489,8 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { Some(ty) } Resolution::LocalBinding(pat) => { - let ty = self.type_of_pat.get(pat)?; - let ty = self.resolve_ty_as_possible(&mut vec![], ty.clone()); + let ty = self.type_of_pat.get(pat)?.clone(); + let ty = self.resolve_ty_as_possible(&mut vec![], ty); Some(ty) } Resolution::GenericParam(..) => {