6920: Minor API cleanup r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-12-17 17:18:50 +00:00 committed by GitHub
commit b0e5d1efdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1284,14 +1284,12 @@ impl Impl {
impls.for_trait(trait_.id).map(Self::from).collect()
}
// FIXME: the return type is wrong. This should be a hir version of
// `TraitRef` (ie, resolved `TypeRef`).
pub fn target_trait(self, db: &dyn HirDatabase) -> Option<TypeRef> {
db.impl_data(self.id).target_trait.clone()
}
pub fn target_type(self, db: &dyn HirDatabase) -> TypeRef {
db.impl_data(self.id).target_type.clone()
}
pub fn target_ty(self, db: &dyn HirDatabase) -> Type {
let impl_data = db.impl_data(self.id);
let resolver = self.id.resolver(db.upcast());