1
Fork 0

rm unnecessary OpaqueTypeDecl wrapper

This commit is contained in:
lcnr 2025-01-13 14:14:57 +01:00
parent b4045a404e
commit 87f03a4238
7 changed files with 24 additions and 32 deletions

View file

@ -436,9 +436,9 @@ fn check_opaque_meets_bounds<'tcx>(
} else {
// Check that any hidden types found during wf checking match the hidden types that `type_of` sees.
for (mut key, mut ty) in infcx.take_opaque_types() {
ty.hidden_type.ty = infcx.resolve_vars_if_possible(ty.hidden_type.ty);
ty.ty = infcx.resolve_vars_if_possible(ty.ty);
key = infcx.resolve_vars_if_possible(key);
sanity_check_found_hidden_type(tcx, key, ty.hidden_type)?;
sanity_check_found_hidden_type(tcx, key, ty)?;
}
Ok(())
}
@ -1873,7 +1873,7 @@ pub(super) fn check_coroutine_obligations(
// Check that any hidden types found when checking these stalled coroutine obligations
// are valid.
for (key, ty) in infcx.take_opaque_types() {
let hidden_type = infcx.resolve_vars_if_possible(ty.hidden_type);
let hidden_type = infcx.resolve_vars_if_possible(ty);
let key = infcx.resolve_vars_if_possible(key);
sanity_check_found_hidden_type(tcx, key, hidden_type)?;
}