mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-07 20:43:03 +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)
|
Some(ty)
|
||||||
}
|
}
|
||||||
Resolution::LocalBinding(pat) => {
|
Resolution::LocalBinding(pat) => {
|
||||||
let ty = self.type_of_pat.get(pat)?;
|
let ty = self.type_of_pat.get(pat)?.clone();
|
||||||
let ty = self.resolve_ty_as_possible(&mut vec![], ty.clone());
|
let ty = self.resolve_ty_as_possible(&mut vec![], ty);
|
||||||
Some(ty)
|
Some(ty)
|
||||||
}
|
}
|
||||||
Resolution::GenericParam(..) => {
|
Resolution::GenericParam(..) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user