Account for trait implementations and other kinds of deep searching
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
The essential problem is that this search query doesn't work the way it would be expected to:
Iterator<T>, (Fn(T) -> U) -> Iterator<U>
That sure looks like it would be the type signature of Iterator::map, but, technically, it's not. That's Iterator<T>, F -> Map<F>, because there's a special concrete type used there.
Iterator<Result<T>> -> Result<T>
Similarly, this looks like it would be Result::from_iter, but, again, it's not. It's technically IntoIterator<Result<T>> -> Result<T>
To make the search actually work, we need to account for trait implementations. From search.js's point of view, all of this can be treated like subtyping (in the language, that's not technically what it is, but this is a search engine and it can play faster and looser with things).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with search.js and reproduce the two example queries involving Iterator::map and Result::from_iter. Trace how type signatures are matched, then verify that searches account for trait implementations as described and return the expected results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100