Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/opaques.rs')
-rw-r--r--crates/hir-ty/src/infer/opaques.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/hir-ty/src/infer/opaques.rs b/crates/hir-ty/src/infer/opaques.rs
index ce4597f83d..a39288721b 100644
--- a/crates/hir-ty/src/infer/opaques.rs
+++ b/crates/hir-ty/src/infer/opaques.rs
@@ -112,12 +112,12 @@ impl<'db> InferenceContext<'_, 'db> {
_ = self.demand_eqtype_fixme_no_diag(expected, hidden_type.ty);
}
- self.result.type_of_opaque.insert(def_id, ty.ty);
+ self.result.type_of_opaque.insert(def_id, ty.ty.store());
continue;
}
- self.result.type_of_opaque.insert(def_id, self.types.error);
+ self.result.type_of_opaque.insert(def_id, self.types.types.error.store());
}
}
@@ -139,9 +139,10 @@ impl<'db> InferenceContext<'_, 'db> {
let at = self.table.infer_ctxt.at(&cause, self.table.param_env);
let hidden_type = match at.deeply_normalize(hidden_type) {
Ok(hidden_type) => hidden_type,
- Err(_errors) => OpaqueHiddenType { ty: self.types.error },
+ Err(_errors) => OpaqueHiddenType { ty: self.types.types.error },
};
- let hidden_type = fold_regions(self.interner(), hidden_type, |_, _| self.types.re_erased);
+ let hidden_type =
+ fold_regions(self.interner(), hidden_type, |_, _| self.types.regions.erased);
UsageKind::HasDefiningUse(hidden_type)
}
}