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

@@ -1440,7 +1440,7 @@ fn opaque_type_cycle_error(tcx: TyCtxt<'_>, def_id: LocalDefId, span: Span) -> E
impl<'tcx> ty::visit::TypeVisitor<'tcx> for OpaqueTypeCollector {
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> {
match *t.kind() {
ty::Opaque(ty::OpaqueTy { def_id: def, substs: _ }) => {
ty::Opaque(ty::AliasTy { def_id: def, substs: _ }) => {
self.0.push(def);
ControlFlow::CONTINUE
}

View File

@@ -1746,7 +1746,7 @@ pub fn check_type_bounds<'tcx>(
_ => predicates.push(
ty::Binder::bind_with_vars(
ty::ProjectionPredicate {
projection_ty: ty::ProjectionTy {
projection_ty: ty::AliasTy {
def_id: trait_ty.def_id,
substs: rebased_substs,
},