diff options
Diffstat (limited to 'crates/hir_ty/src/traits')
-rw-r--r-- | crates/hir_ty/src/traits/chalk/mapping.rs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs index 0536b934e..84abd99b2 100644 --- a/crates/hir_ty/src/traits/chalk/mapping.rs +++ b/crates/hir_ty/src/traits/chalk/mapping.rs | |||
@@ -11,8 +11,8 @@ use hir_def::{GenericDefId, TypeAliasId}; | |||
11 | 11 | ||
12 | use crate::{ | 12 | use crate::{ |
13 | chalk_ext::ProjectionTyExt, db::HirDatabase, static_lifetime, AliasTy, CallableDefId, | 13 | chalk_ext::ProjectionTyExt, db::HirDatabase, static_lifetime, AliasTy, CallableDefId, |
14 | Canonical, DomainGoal, FnPointer, GenericArg, InEnvironment, OpaqueTy, ProjectionTy, | 14 | Canonical, ConstrainedSubst, DomainGoal, FnPointer, GenericArg, InEnvironment, OpaqueTy, |
15 | QuantifiedWhereClause, Substitution, TraitRef, Ty, TypeWalk, WhereClause, | 15 | ProjectionTy, QuantifiedWhereClause, Substitution, TraitRef, Ty, TypeWalk, WhereClause, |
16 | }; | 16 | }; |
17 | 17 | ||
18 | use super::interner::*; | 18 | use super::interner::*; |
@@ -459,6 +459,18 @@ where | |||
459 | } | 459 | } |
460 | } | 460 | } |
461 | 461 | ||
462 | impl ToChalk for crate::ConstrainedSubst { | ||
463 | type Chalk = chalk_ir::ConstrainedSubst<Interner>; | ||
464 | |||
465 | fn to_chalk(self, _db: &dyn HirDatabase) -> Self::Chalk { | ||
466 | unimplemented!() | ||
467 | } | ||
468 | |||
469 | fn from_chalk(db: &dyn HirDatabase, chalk: Self::Chalk) -> Self { | ||
470 | ConstrainedSubst { subst: from_chalk(db, chalk.subst) } | ||
471 | } | ||
472 | } | ||
473 | |||
462 | pub(super) fn make_binders<T>(value: T, num_vars: usize) -> chalk_ir::Binders<T> | 474 | pub(super) fn make_binders<T>(value: T, num_vars: usize) -> chalk_ir::Binders<T> |
463 | where | 475 | where |
464 | T: HasInterner<Interner = Interner>, | 476 | T: HasInterner<Interner = Interner>, |