// Before we go into the whole placeholder thing, just
// quickly check if the self-type is a projection at all.
match obligation.predicate.skip_binder().trait_ref.self_ty().kind() {
- ty::Projection(_) | ty::Opaque(..) => {}
+ ty::Alias(..) => {}
ty::Infer(ty::TyVar(_)) => {
span_bug!(
obligation.cause.span,
// still be provided by a manual implementation for
// this trait and type.
}
- ty::Param(..) | ty::Projection(..) => {
+ ty::Param(..) | ty::Alias(ty::Projection, ..) => {
// In these cases, we don't know what the actual
// type is. Therefore, we cannot break it down
// into its constituent types. So we don't
let ty = traits::normalize_projection_type(
self,
param_env,
- ty::ProjectionTy {
- item_def_id: tcx.lang_items().deref_target()?,
- substs: trait_ref.substs,
- },
+ tcx.mk_alias_ty(tcx.lang_items().deref_target()?, trait_ref.substs),
cause.clone(),
0,
// We're *intentionally* throwing these away,
let self_ty = self.infcx.shallow_resolve(obligation.self_ty());
match self_ty.skip_binder().kind() {
- ty::Opaque(..)
+ ty::Alias(..)
| ty::Dynamic(..)
| ty::Error(_)
| ty::Bound(..)
| ty::Param(_)
- | ty::Placeholder(_)
- | ty::Projection(_) => {
+ | ty::Placeholder(_) => {
// We don't know if these are `~const Destruct`, at least
// not structurally... so don't push a candidate.
}
| ty::Generator(_, _, _)
| ty::GeneratorWitness(_)
| ty::Never
- | ty::Projection(_)
- | ty::Opaque(ty::OpaqueTy { def_id: _, substs: _ })
+ | ty::Alias(..)
| ty::Param(_)
| ty::Bound(_, _)
| ty::Error(_)