diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs b/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs index 616b9fd4484a..1d9f7dc06514 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/infer.rs @@ -498,7 +498,7 @@ pub struct InferenceResult<'db> { /// unresolved or missing subpatterns or subpatterns of mismatched types. pub(crate) type_of_pat: ArenaMap>, pub(crate) type_of_binding: ArenaMap>, - pub(crate) type_of_type_placeholder: ArenaMap>, + pub(crate) type_of_type_placeholder: FxHashMap>, pub(crate) type_of_opaque: FxHashMap>, pub(crate) type_mismatches: Option>>>, @@ -623,10 +623,10 @@ pub fn expr_type_mismatches(&self) -> impl Iterator impl Iterator)> { - self.type_of_type_placeholder.iter() + self.type_of_type_placeholder.iter().map(|(&type_ref, ty)| (type_ref, ty)) } pub fn type_of_type_placeholder(&self, type_ref: TypeRefId) -> Option> { - self.type_of_type_placeholder.get(type_ref).copied() + self.type_of_type_placeholder.get(&type_ref).copied() } pub fn closure_info(&self, closure: InternedClosureId) -> &(Vec>, FnTrait) { self.closure_info.get(&closure).unwrap()