diff options
author | Laurențiu Nicola <[email protected]> | 2019-04-08 14:47:28 +0100 |
---|---|---|
committer | Laurențiu Nicola <[email protected]> | 2019-04-08 14:47:28 +0100 |
commit | 61c09edb4af6973e9ac5a84c954470c1fd4c9a0f (patch) | |
tree | 69bfedb7842b2d39f4a2ef382b84e5adb0d4aa95 | |
parent | 1e2178eb8e02b0118c8cad7e631368cbee94ea72 (diff) |
Avoid two-phase borrow conflict
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 9ace6b13a..28947be51 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> { | |||
489 | Some(ty) | 489 | Some(ty) |
490 | } | 490 | } |
491 | Resolution::LocalBinding(pat) => { | 491 | Resolution::LocalBinding(pat) => { |
492 | let ty = self.type_of_pat.get(pat)?; | 492 | let ty = self.type_of_pat.get(pat)?.clone(); |
493 | let ty = self.resolve_ty_as_possible(&mut vec![], ty.clone()); | 493 | let ty = self.resolve_ty_as_possible(&mut vec![], ty); |
494 | Some(ty) | 494 | Some(ty) |
495 | } | 495 | } |
496 | Resolution::GenericParam(..) => { | 496 | Resolution::GenericParam(..) => { |