aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/traits/chalk/mapping.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-06 22:49:10 +0100
committerGitHub <[email protected]>2021-04-06 22:49:10 +0100
commitfcb22a674df4728742a865dda76ce65f0f9205b1 (patch)
tree9131d26bacbda364c81ad0ace9d4428b0d8e3c33 /crates/hir_ty/src/traits/chalk/mapping.rs
parent31d2b3b9cb75a09c93655b38377ed5f4144ebaf0 (diff)
parentb03969cda92661ad67897fee0ba16c1cc61830ea (diff)
Merge #8387
8387: Remove `SolutionVariables`, add ConstrainedSubst analogous to Chalk r=flodiebold a=flodiebold ... just missing the constraints. Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/traits/chalk/mapping.rs')
-rw-r--r--crates/hir_ty/src/traits/chalk/mapping.rs16
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
12use crate::{ 12use 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
18use super::interner::*; 18use super::interner::*;
@@ -459,6 +459,18 @@ where
459 } 459 }
460} 460}
461 461
462impl 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
462pub(super) fn make_binders<T>(value: T, num_vars: usize) -> chalk_ir::Binders<T> 474pub(super) fn make_binders<T>(value: T, num_vars: usize) -> chalk_ir::Binders<T>
463where 475where
464 T: HasInterner<Interner = Interner>, 476 T: HasInterner<Interner = Interner>,