Skip to content

rustdoc does not show where clauses in type aliases #25769

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
bluss opened this issue May 25, 2015 · 0 comments · Fixed by #25675
Closed

rustdoc does not show where clauses in type aliases #25769

bluss opened this issue May 25, 2015 · 0 comments · Fixed by #25675
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@bluss
Copy link
Member

bluss commented May 25, 2015

Rustdoc does not show where clauses in type aliases

Code is:

pub type MapFn<I, B> where I: Iterator = iter::Map<I, fn(I::Item) -> B>;

Renders in rustdoc as:

type MapFn<I, B> = Map<I, fn(I) -> B>;

The abbreviation of Map is great (it's a link), the loss of the associated types is probably bug #24417, but the where clause is missing too.

@steveklabnik steveklabnik added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 25, 2015
bluss pushed a commit to bluss/rust that referenced this issue May 25, 2015
Yes, it's allowed. Example:

    type MapFn<I, B> where I: Iterator = Map<I, fn(I::Item) -> B>;

Fixes rust-lang#25769
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
Yes, it's allowed. Example:

    type MapFn<I, B> where I: Iterator = Map<I, fn(I::Item) -> B>;

Fixes rust-lang#25769
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.

2 participants