aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/lib.rs22
1 files changed, 11 insertions, 11 deletions
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::{
56 primitive::UintTy, 56 primitive::UintTy,
57 to_assoc_type_id, 57 to_assoc_type_id,
58 traits::{FnTrait, Solution, SolutionVariables}, 58 traits::{FnTrait, Solution, SolutionVariables},
59 AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, DebruijnIndex, GenericPredicate, 59 AliasEq, AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, DebruijnIndex,
60 InEnvironment, Interner, Obligation, ProjectionPredicate, ProjectionTy, Scalar, Substitution, 60 GenericPredicate, InEnvironment, Interner, Obligation, ProjectionTy, Scalar, Substitution, Ty,
61 Ty, TyDefId, TyKind, TyVariableKind, 61 TyDefId, TyKind, TyVariableKind,
62}; 62};
63use itertools::Itertools; 63use itertools::Itertools;
64use rustc_hash::FxHashSet; 64use rustc_hash::FxHashSet;
@@ -1786,17 +1786,17 @@ impl Type {
1786 .push(self.ty.value.clone()) 1786 .push(self.ty.value.clone())
1787 .fill(args.iter().map(|t| t.ty.value.clone())) 1787 .fill(args.iter().map(|t| t.ty.value.clone()))
1788 .build(); 1788 .build();
1789 let predicate = ProjectionPredicate {
1790 projection_ty: ProjectionTy {
1791 associated_ty_id: to_assoc_type_id(alias.id),
1792 substitution: subst,
1793 },
1794 ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0)).intern(&Interner),
1795 };
1796 let goal = Canonical { 1789 let goal = Canonical {
1797 value: InEnvironment::new( 1790 value: InEnvironment::new(
1798 self.ty.environment.clone(), 1791 self.ty.environment.clone(),
1799 Obligation::Projection(predicate), 1792 Obligation::AliasEq(AliasEq {
1793 alias: AliasTy::Projection(ProjectionTy {
1794 associated_ty_id: to_assoc_type_id(alias.id),
1795 substitution: subst,
1796 }),
1797 ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0))
1798 .intern(&Interner),
1799 }),
1800 ), 1800 ),
1801 kinds: Arc::new([TyVariableKind::General]), 1801 kinds: Arc::new([TyVariableKind::General]),
1802 }; 1802 };