Combine projection and opaque into alias

This commit is contained in:
Michael Goulet
2022-11-26 21:51:55 +00:00
parent c13bd83528
commit 61adaf8187
104 changed files with 387 additions and 381 deletions

View File

@@ -82,8 +82,8 @@ pub(crate) fn eval_nullary_intrinsic<'tcx>(
ty::Adt(ref adt, _) => {
ConstValue::from_machine_usize(adt.variants().len() as u64, &tcx)
}
ty::Projection(_)
| ty::Opaque(ty::AliasTy { def_id: _, substs: _ })
ty::Alias(ty::Projection, _)
| ty::Alias(ty::Opaque, ty::AliasTy { def_id: _, substs: _ })
| ty::Param(_)
| ty::Placeholder(_)
| ty::Infer(_) => throw_inval!(TooGeneric),

View File

@@ -601,8 +601,8 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
| ty::Placeholder(..)
| ty::Bound(..)
| ty::Param(..)
| ty::Opaque(..)
| ty::Projection(..)
| ty::Alias(ty::Opaque, ..)
| ty::Alias(ty::Projection, ..)
| ty::GeneratorWitness(..) => bug!("Encountered invalid type {:?}", ty),
}
}