Skip to content

rustdoc prints types in traits different than rustc #22000

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
RalfJung opened this issue Feb 6, 2015 · 2 comments
Closed

rustdoc prints types in traits different than rustc #22000

RalfJung opened this issue Feb 6, 2015 · 2 comments

Comments

@RalfJung
Copy link
Member

RalfJung commented Feb 6, 2015

The syntax that rustdoc uses to refer to types declared internally within a trait ("associated types"), is different from what rustc expects. This is fairly confusing for a newbie, who tries to learn the language by example - in particular, by looking at how the standard API does things.

For example, the documentation of the Iterator trait http://doc.rust-lang.org/std/iter/trait.Iterator.html refers to the type "Item" simply by "Item", but I have to write "Self::Item" for this code to actually compile.

@tomjakubowski
Copy link
Contributor

This is a dupe of #21445, sort of (see #21145 (comment)).

In any case this specific aspect of #21445 will be closed by #21999.

@alexcrichton
Copy link
Member

Closing as a dupe of #21145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants