diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-17 17:18:50 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-17 17:18:50 +0000 |
commit | b0e5d1efdbf81fccf655b202d2433700d6e312e1 (patch) | |
tree | 85d18aa1ab5700009593c0f2492b76a6eee39c66 /crates/hir/src | |
parent | ce3db6c9270411d34635cc6106115110c84a27f6 (diff) | |
parent | 30216880c406fc6fb0f48d5b9d22eb40860a07e7 (diff) |
Merge #6920
6920: Minor API cleanup r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
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()); |