squash OpaqueTy and ProjectionTy into AliasTy

This commit is contained in:
Michael Goulet
2022-11-26 21:32:01 +00:00
parent 5c6afb850c
commit c13bd83528
66 changed files with 182 additions and 197 deletions

View File

@@ -652,8 +652,8 @@ impl<'tcx> TypeSuperFoldable<'tcx> for Ty<'tcx> {
ty::GeneratorWitness(types) => ty::GeneratorWitness(types.try_fold_with(folder)?),
ty::Closure(did, substs) => ty::Closure(did, substs.try_fold_with(folder)?),
ty::Projection(data) => ty::Projection(data.try_fold_with(folder)?),
ty::Opaque(ty::OpaqueTy { def_id, substs }) => {
ty::Opaque(ty::OpaqueTy { def_id, substs: substs.try_fold_with(folder)? })
ty::Opaque(ty::AliasTy { def_id, substs }) => {
ty::Opaque(ty::AliasTy { def_id, substs: substs.try_fold_with(folder)? })
}
ty::Bool
@@ -700,7 +700,7 @@ impl<'tcx> TypeSuperVisitable<'tcx> for Ty<'tcx> {
ty::GeneratorWitness(ref types) => types.visit_with(visitor),
ty::Closure(_did, ref substs) => substs.visit_with(visitor),
ty::Projection(ref data) => data.visit_with(visitor),
ty::Opaque(ty::OpaqueTy { def_id: _, ref substs }) => substs.visit_with(visitor),
ty::Opaque(ty::AliasTy { def_id: _, ref substs }) => substs.visit_with(visitor),
ty::Bool
| ty::Char