mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Replace incorrect ArenaMap use with FxHashMap
This commit is contained in:
@@ -498,7 +498,7 @@ pub struct InferenceResult<'db> {
|
||||
/// unresolved or missing subpatterns or subpatterns of mismatched types.
|
||||
pub(crate) type_of_pat: ArenaMap<PatId, Ty<'db>>,
|
||||
pub(crate) type_of_binding: ArenaMap<BindingId, Ty<'db>>,
|
||||
pub(crate) type_of_type_placeholder: ArenaMap<TypeRefId, Ty<'db>>,
|
||||
pub(crate) type_of_type_placeholder: FxHashMap<TypeRefId, Ty<'db>>,
|
||||
pub(crate) type_of_opaque: FxHashMap<InternedOpaqueTyId, Ty<'db>>,
|
||||
|
||||
pub(crate) type_mismatches: Option<Box<FxHashMap<ExprOrPatId, TypeMismatch<'db>>>>,
|
||||
@@ -623,10 +623,10 @@ pub fn expr_type_mismatches(&self) -> impl Iterator<Item = (ExprId, &TypeMismatc
|
||||
)
|
||||
}
|
||||
pub fn placeholder_types(&self) -> impl Iterator<Item = (TypeRefId, &Ty<'db>)> {
|
||||
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<Ty<'db>> {
|
||||
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<CapturedItem<'db>>, FnTrait) {
|
||||
self.closure_info.get(&closure).unwrap()
|
||||
|
||||
Reference in New Issue
Block a user