Skip to content

Commit

Permalink
Avoid two-phase borrow conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Apr 8, 2019
1 parent 1e2178e commit 61c09ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/ra_hir/src/ty/infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(..) => {
Expand Down

0 comments on commit 61c09ed

Please # to comment.