diff options
author | Florian Diebold <[email protected]> | 2020-02-07 17:17:23 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2020-02-07 17:28:11 +0000 |
commit | 9d6061f3bb935c914a6d58df803dd42770f2f7e2 (patch) | |
tree | e1fef57e0dc0c26e2f48814bb98d4cd57fa49ba9 /crates/ra_hir_ty/src/lower.rs | |
parent | 6b9d05d1937f298df4197cebf862c3f644dd6778 (diff) |
Fix some TODOs
Diffstat (limited to 'crates/ra_hir_ty/src/lower.rs')
-rw-r--r-- | crates/ra_hir_ty/src/lower.rs | 10 |
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 | ||
893 | pub(crate) fn ty_recover(_db: &impl HirDatabase, _cycle: &[String], _def: &TyDefId) -> Binders<Ty> { | 893 | pub(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 | ||
898 | pub(crate) fn value_ty_query(db: &impl HirDatabase, def: ValueTyDefId) -> Binders<Ty> { | 902 | pub(crate) fn value_ty_query(db: &impl HirDatabase, def: ValueTyDefId) -> Binders<Ty> { |