Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions crates/hir/src/code_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down