diff options
author | Florian Diebold <[email protected]> | 2021-04-06 22:46:32 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-06 22:46:32 +0100 |
commit | b03969cda92661ad67897fee0ba16c1cc61830ea (patch) | |
tree | 9131d26bacbda364c81ad0ace9d4428b0d8e3c33 /crates/hir_ty/src/traits/chalk | |
parent | 31d2b3b9cb75a09c93655b38377ed5f4144ebaf0 (diff) |
Remove `SolutionVariables`, add ConstrainedSubst analogous to Chalk
... just missing the constraints.
Diffstat (limited to 'crates/hir_ty/src/traits/chalk')
-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>, |