Skip to content
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

Rustdoc doesn't render all impl Trait details #49373

Closed
Nemo157 opened this issue Mar 26, 2018 · 3 comments · Fixed by #49427
Closed

Rustdoc doesn't render all impl Trait details #49373

Nemo157 opened this issue Mar 26, 2018 · 3 comments · Fixed by #49427
Assignees
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Nemo157
Copy link
Member

Nemo157 commented Mar 26, 2018

Given a function definition

pub fn timeout<'a>(&'a mut self, duration: Duration) -> impl Future<Item=(), Error=!> + 'a

then this is currently (rustc 1.26.0-nightly (482a913fb 2018-03-25)) rendered as

impl-trait-doc

There are two very important bits of information missing from this:

  • The associated types of the Future trait
  • The lifetime bound on the returned type
@SimonSapin SimonSapin added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-dev-tools-rustdoc labels Mar 26, 2018
@Manishearth
Copy link
Member

Hmm, I'm unable to reproduce this on the latest nightly -- can you provide a link to the complete code causing this?

(Will try the older nightly soon)

@Nemo157
Copy link
Member Author

Nemo157 commented Mar 26, 2018

Ah, this also requires re-exporting from a facade crate. I can't show my original code, but here's a quick example that repros it: https://github.com/Nemo157/rust-lang-rust-issue-49373, in inner/struct.Timer.html it does show the details, but not in temp/struct.Timer.html (a re-export of the previous struct).

@Manishearth
Copy link
Member

#49427

kennytm added a commit to kennytm/rust that referenced this issue Mar 28, 2018
…rn, r=GuillaumeGomez

Correctly handle impl trait in external items in rustdoc

fixes rust-lang#49373

r? @QuietMisdreavus
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