Minor API cleanup

This commit is contained in:
Aleksey Kladov 2020-12-17 20:14:13 +03:00
parent 4368a3bceb
commit 30216880c4

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());