Skip to content

Associated types are broken in the rustdoc search index #22442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tomjakubowski opened this issue Feb 17, 2015 · 2 comments · Fixed by #25675
Closed

Associated types are broken in the rustdoc search index #22442

tomjakubowski opened this issue Feb 17, 2015 · 2 comments · Fixed by #25675
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@tomjakubowski
Copy link
Contributor

http://doc.rust-lang.org/std/?search=Item

std::env::Item, for example, is the Item type of the Iterator impl for std::env::Args. Not only is the path wrong, but the link in the search index 404s.

@huonw huonw added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Feb 17, 2015
bluss pushed a commit to bluss/rust that referenced this issue May 8, 2015
This is related to isssue rust-lang#22442 and solves it partly.

This solves the links of associated types and constants, so that they
link to the trait page.
@bluss
Copy link
Member

bluss commented May 8, 2015

It looks like associated types "leak" with doc inclusion and become types in their parent module.

Edit: It's not doc inclusion.

bors added a commit that referenced this issue May 11, 2015
Rustdoc fixes for associated items

This is related to isssue #22442 and solves it partly.

This solves the search index links of associated types and constants,
so that they link to the trait page.

Also add an Associated Constants section if constants are present.
@bluss
Copy link
Member

bluss commented May 21, 2015

I've chased this down

bluss pushed a commit to bluss/rust that referenced this issue May 21, 2015
For a trait *implementation* there are typedefs which are the types for
that particular trait and implementor. Skip these in the search index.

There were lots of dud items in the search index due to this (search for
Item, Iterator's associated type).

Add a boolean to clean::TypedefItem so that it tracks whether the it is
a type alias on its own, or if it's a `type` item in a trait impl.

Fixes rust-lang#22442
bors added a commit that referenced this issue May 26, 2015
rustdoc: Associated type fixes

The first commit fixes a bug with "dud" items in the search index from
misrepresented `type` items in trait impl blocks.

For a trait *implementation* there are typedefs which are the types for
that particular trait and implementor. Skip these in the search index.

There were lots of dud items in the search index due to this (search for
Item, Iterator's associated type).

Add a boolean to clean::TypedefItem so that it tracks whether the it is
a type alias on its own, or if it's a `type` item in a trait impl.

The second commit fixes a bug that made signatures and where bounds
using associated types (if they were not on `Self`) incorrect.

The third commit fixes so that where clauses in type alias definititons
are shown.

Fixes #22442
Fixes #24417
Fixes #25769
XMPPwocky pushed a commit to XMPPwocky/rust that referenced this issue May 29, 2015
For a trait *implementation* there are typedefs which are the types for
that particular trait and implementor. Skip these in the search index.

There were lots of dud items in the search index due to this (search for
Item, Iterator's associated type).

Add a boolean to clean::TypedefItem so that it tracks whether the it is
a type alias on its own, or if it's a `type` item in a trait impl.

Fixes rust-lang#22442
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants