diff options
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/lib.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 13aaa408a..817a01db1 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 | }; |
64 | use itertools::Itertools; | 65 | use itertools::Itertools; |
65 | use rustc_hash::FxHashSet; | 66 | use 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)) |
@@ -1902,7 +1903,9 @@ impl Type { | |||
1902 | | TyKind::Dyn(_) | 1903 | | TyKind::Dyn(_) |
1903 | | TyKind::Function(_) | 1904 | | TyKind::Function(_) |
1904 | | TyKind::Alias(_) | 1905 | | TyKind::Alias(_) |
1905 | | TyKind::Foreign(_) => false, | 1906 | | TyKind::Foreign(_) |
1907 | | TyKind::Generator(..) | ||
1908 | | TyKind::GeneratorWitness(..) => false, | ||
1906 | } | 1909 | } |
1907 | } | 1910 | } |
1908 | } | 1911 | } |