aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/lower.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-02-07 17:17:23 +0000
committerFlorian Diebold <[email protected]>2020-02-07 17:28:11 +0000
commit9d6061f3bb935c914a6d58df803dd42770f2f7e2 (patch)
treee1fef57e0dc0c26e2f48814bb98d4cd57fa49ba9 /crates/ra_hir_ty/src/lower.rs
parent6b9d05d1937f298df4197cebf862c3f644dd6778 (diff)
Fix some TODOs
Diffstat (limited to 'crates/ra_hir_ty/src/lower.rs')
-rw-r--r--crates/ra_hir_ty/src/lower.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/ra_hir_ty/src/lower.rs
index d2df3fe2b..c68c5852b 100644
--- a/crates/ra_hir_ty/src/lower.rs
+++ b/crates/ra_hir_ty/src/lower.rs
@@ -890,9 +890,13 @@ pub(crate) fn ty_query(db: &impl HirDatabase, def: TyDefId) -> Binders<Ty> {
890 } 890 }
891} 891}
892 892
893pub(crate) fn ty_recover(_db: &impl HirDatabase, _cycle: &[String], _def: &TyDefId) -> Binders<Ty> { 893pub(crate) fn ty_recover(db: &impl HirDatabase, _cycle: &[String], def: &TyDefId) -> Binders<Ty> {
894 // TODO still need correct number of binders here 894 let num_binders = match *def {
895 Binders::new(0, Ty::Unknown) 895 TyDefId::BuiltinType(_) => 0,
896 TyDefId::AdtId(it) => generics(db, it.into()).len(),
897 TyDefId::TypeAliasId(it) => generics(db, it.into()).len(),
898 };
899 Binders::new(num_binders, Ty::Unknown)
896} 900}
897 901
898pub(crate) fn value_ty_query(db: &impl HirDatabase, def: ValueTyDefId) -> Binders<Ty> { 902pub(crate) fn value_ty_query(db: &impl HirDatabase, def: ValueTyDefId) -> Binders<Ty> {