diff options
author | Aleksey Kladov <[email protected]> | 2020-12-17 17:14:13 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-12-17 17:14:13 +0000 |
commit | 30216880c406fc6fb0f48d5b9d22eb40860a07e7 (patch) | |
tree | bbb36eca603d78d233f985b0d26a2386609f79d4 /crates/hir/src | |
parent | 4368a3bcebca131dd5c7ccecc54e64b3c5bd0c78 (diff) |
Minor API cleanup
Diffstat (limited to 'crates/hir/src')
-rw-r--r-- | crates/hir/src/code_model.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index 2c0e0eae0..f17734e41 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs | |||
@@ -1284,14 +1284,12 @@ impl Impl { | |||
1284 | impls.for_trait(trait_.id).map(Self::from).collect() | 1284 | impls.for_trait(trait_.id).map(Self::from).collect() |
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | // FIXME: the return type is wrong. This should be a hir version of | ||
1288 | // `TraitRef` (ie, resolved `TypeRef`). | ||
1287 | pub fn target_trait(self, db: &dyn HirDatabase) -> Option<TypeRef> { | 1289 | pub fn target_trait(self, db: &dyn HirDatabase) -> Option<TypeRef> { |
1288 | db.impl_data(self.id).target_trait.clone() | 1290 | db.impl_data(self.id).target_trait.clone() |
1289 | } | 1291 | } |
1290 | 1292 | ||
1291 | pub fn target_type(self, db: &dyn HirDatabase) -> TypeRef { | ||
1292 | db.impl_data(self.id).target_type.clone() | ||
1293 | } | ||
1294 | |||
1295 | pub fn target_ty(self, db: &dyn HirDatabase) -> Type { | 1293 | pub fn target_ty(self, db: &dyn HirDatabase) -> Type { |
1296 | let impl_data = db.impl_data(self.id); | 1294 | let impl_data = db.impl_data(self.id); |
1297 | let resolver = self.id.resolver(db.upcast()); | 1295 | let resolver = self.id.resolver(db.upcast()); |