So, after a little discussion with Steve there is an even more minimal MVP. The basic idea is to only take account of inherent impls (we also get the most basic trait impls in the same crate). There’s a little bit of work to do in a few places since the existing code is meant for a different use case. I think that the key work items are:
- check that we emit a
Relation
struct for everyimpl
we’re interested in (it’s possible bugs have happened since I last used this data - add the id of an impl to
Relation::Impl
or change theto
id inRelation
to be the id of the impl, not the trait - emit information about the impl - I think we should use the
Impl
struct for this, though we might miss some fields such asImplKind
- I believe then we have enough information to link a type to some of its impls and then to the methods contained inside (or to a trait and then to methods)
- we’ll need to modify rls-analysis to store all this data in its tables and API to make the data available.
As opposed to the full plan in the previous comment, I know how to do all of this! I believe this shouldn’t be too much work either - hours rather than weeks. I’d be happy to mentor anyone who wants to have a go, and can help out too, though won’t have time to do everything since I am travelling next week and have a massive backlog of work.