From 8996b1a2353539cb9c264d0effbde80567de6586 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 19 Mar 2021 02:07:15 +0100 Subject: Replace Projection variant in GenericPredicate with AliasEq --- crates/hir/src/lib.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'crates/hir/src/lib.rs') diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 67ec8e82a..5ebd0a3b8 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -56,9 +56,9 @@ use hir_ty::{ primitive::UintTy, to_assoc_type_id, traits::{FnTrait, Solution, SolutionVariables}, - AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, DebruijnIndex, GenericPredicate, - InEnvironment, Interner, Obligation, ProjectionPredicate, ProjectionTy, Scalar, Substitution, - Ty, TyDefId, TyKind, TyVariableKind, + AliasEq, AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, DebruijnIndex, + GenericPredicate, InEnvironment, Interner, Obligation, ProjectionTy, Scalar, Substitution, Ty, + TyDefId, TyKind, TyVariableKind, }; use itertools::Itertools; use rustc_hash::FxHashSet; @@ -1786,17 +1786,17 @@ impl Type { .push(self.ty.value.clone()) .fill(args.iter().map(|t| t.ty.value.clone())) .build(); - let predicate = ProjectionPredicate { - projection_ty: ProjectionTy { - associated_ty_id: to_assoc_type_id(alias.id), - substitution: subst, - }, - ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0)).intern(&Interner), - }; let goal = Canonical { value: InEnvironment::new( self.ty.environment.clone(), - Obligation::Projection(predicate), + Obligation::AliasEq(AliasEq { + alias: AliasTy::Projection(ProjectionTy { + associated_ty_id: to_assoc_type_id(alias.id), + substitution: subst, + }), + ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0)) + .intern(&Interner), + }), ), kinds: Arc::new([TyVariableKind::General]), }; -- cgit v1.2.3