1
Fork 0

Normalize opaques during codegen in new solver

This commit is contained in:
Michael Goulet 2023-07-04 18:49:13 +00:00
parent 713f9bb5d1
commit f55b046931
5 changed files with 46 additions and 6 deletions

View file

@ -167,9 +167,7 @@ impl<'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for NormalizationFolder<'_, 'tcx> {
// We don't normalize opaque types unless we have
// `Reveal::All`, even if we're in the defining scope.
let data = match *ty.kind() {
ty::Alias(kind, alias_ty) if kind != ty::Opaque || reveal == Reveal::UserFacing => {
alias_ty
}
ty::Alias(kind, alias_ty) if kind != ty::Opaque || reveal == Reveal::All => alias_ty,
_ => return ty.try_super_fold_with(self),
};