-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-type-based-searchArea: Searching rustdoc pages using type signaturesArea: Searching rustdoc pages using type signaturesC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
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).
Metadata
Metadata
Assignees
Labels
A-type-based-searchArea: Searching rustdoc pages using type signaturesArea: Searching rustdoc pages using type signaturesC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.