Skip to content

Account for trait implementations and other kinds of deep searching #127499

Open
@notriddle

Description

@notriddle

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

No one assigned

    Labels

    A-type-based-searchArea: Searching rustdoc pages using type signaturesC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions