Skip to content

Commit

Permalink
Merge #1121
Browse files Browse the repository at this point in the history
1121: Avoid two-phase borrow conflict r=matklad a=lnicola

See rust-lang/rust#59159.

Co-authored-by: Laurențiu Nicola <[email protected]>
  • Loading branch information
bors[bot] and lnicola committed Apr 8, 2019
2 parents 1e2178e + 61c09ed commit 1ca7a74
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 1ca7a74

Please sign in to comment.