aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/lib.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 13aaa408a..0afc06906 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -59,7 +59,8 @@ use hir_ty::{
59 traits::FnTrait, 59 traits::FnTrait,
60 AliasEq, AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, CanonicalVarKinds, Cast, 60 AliasEq, AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, CanonicalVarKinds, Cast,
61 DebruijnIndex, InEnvironment, Interner, QuantifiedWhereClause, Scalar, Solution, Substitution, 61 DebruijnIndex, InEnvironment, Interner, QuantifiedWhereClause, Scalar, Solution, Substitution,
62 TraitEnvironment, Ty, TyBuilder, TyDefId, TyExt, TyKind, TyVariableKind, WhereClause, 62 TraitEnvironment, TraitRefExt, Ty, TyBuilder, TyDefId, TyExt, TyKind, TyVariableKind,
63 WhereClause,
63}; 64};
64use itertools::Itertools; 65use itertools::Itertools;
65use rustc_hash::FxHashSet; 66use rustc_hash::FxHashSet;
@@ -1790,7 +1791,7 @@ impl Type {
1790 .build(); 1791 .build();
1791 1792
1792 let goal = Canonical { 1793 let goal = Canonical {
1793 value: hir_ty::InEnvironment::new(self.env.env.clone(), trait_ref.cast(&Interner)), 1794 value: hir_ty::InEnvironment::new(&self.env.env, trait_ref.cast(&Interner)),
1794 binders: CanonicalVarKinds::empty(&Interner), 1795 binders: CanonicalVarKinds::empty(&Interner),
1795 }; 1796 };
1796 1797
@@ -1807,9 +1808,9 @@ impl Type {
1807 .push(self.ty.clone()) 1808 .push(self.ty.clone())
1808 .fill(args.iter().map(|t| t.ty.clone())) 1809 .fill(args.iter().map(|t| t.ty.clone()))
1809 .build(); 1810 .build();
1810 let goal = Canonical::new( 1811 let goal = hir_ty::make_canonical(
1811 InEnvironment::new( 1812 InEnvironment::new(
1812 self.env.env.clone(), 1813 &self.env.env,
1813 AliasEq { 1814 AliasEq {
1814 alias: AliasTy::Projection(projection), 1815 alias: AliasTy::Projection(projection),
1815 ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0)) 1816 ty: TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0))