From da79a562a7f2d925626139c8e4749dc1eb317d23 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sat, 29 Nov 2025 11:51:32 +0100 Subject: [PATCH] Replace incorrect `ArenaMap` use with `FxHashMap` --- src/tools/rust-analyzer/crates/hir-ty/src/infer.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()