Skip to content

Commit 1ca7a74

Browse files
bors[bot]lnicola
andcommitted
Merge #1121
1121: Avoid two-phase borrow conflict r=matklad a=lnicola See rust-lang/rust#59159. Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 parents 1e2178e + 61c09ed commit 1ca7a74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/ra_hir/src/ty/infer.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,8 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
489489
Some(ty)
490490
}
491491
Resolution::LocalBinding(pat) => {
492-
let ty = self.type_of_pat.get(pat)?;
493-
let ty = self.resolve_ty_as_possible(&mut vec![], ty.clone());
492+
let ty = self.type_of_pat.get(pat)?.clone();
493+
let ty = self.resolve_ty_as_possible(&mut vec![], ty);
494494
Some(ty)
495495
}
496496
Resolution::GenericParam(..) => {

0 commit comments

Comments
 (0)