mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-31 17:12:53 +00:00
Merge #1121
1121: Avoid two-phase borrow conflict r=matklad a=lnicola See https://github.com/rust-lang/rust/issues/59159. Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
This commit is contained in:
commit
1ca7a744eb
@ -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(..) => {
|
||||
|
Loading…
Reference in New Issue
Block a user