also try to normalize opaque types in alias-relate
with this, alias-relate treats all aliases the same way and it can be used for structural normalization.
This commit is contained in:
parent
0a5b998c57
commit
bbe2f6c0b2
5 changed files with 27 additions and 98 deletions
|
@ -1325,6 +1325,12 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
std::mem::take(&mut self.inner.borrow_mut().opaque_type_storage.opaque_types)
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip(self), ret)]
|
||||
pub fn clone_opaque_types(&self) -> opaque_types::OpaqueTypeMap<'tcx> {
|
||||
debug_assert_ne!(self.defining_use_anchor, DefiningAnchor::Error);
|
||||
self.inner.borrow().opaque_type_storage.opaque_types.clone()
|
||||
}
|
||||
|
||||
pub fn ty_to_string(&self, t: Ty<'tcx>) -> String {
|
||||
self.resolve_vars_if_possible(t).to_string()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue