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 should not fail to generate documentation when deep types are involved #62559

Open
nagisa opened this issue Jul 10, 2019 · 4 comments
Open
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@nagisa
Copy link
Member

nagisa commented Jul 10, 2019

Ref. #62059

To fix the referenced issue we raised the recursion limit, however if there is a type that exceeds this limit again, we will start failing to generate documentation for the crate in question and all the dependent crates using these deep types again.

rustdoc uses the regular trait selection mechanism to check for auto-traits, so it is not too easy to make rustdoc to ignore those failures and not generate an entry for the implementation in rustdoc instead of erroring.

Ideal behaviour would be a warning during documentation generation and a missing entry in the "Implementors" section.

@jonas-schievink jonas-schievink added C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 10, 2019
@GuillaumeGomez
Copy link
Member

How is the compiler handling such a case? If we could use the same in rustdoc, that'd be even better than warn about it.

@nagisa
Copy link
Member Author

nagisa commented Jul 16, 2019

The compiler requires user crates to increase the recursion limit manually, but unlike with rustdoc, you will only ever hit those cases in regular compilation when you actually use types in a certain way that would require such recursion. rustdoc is significantly more prone to such recursion.

@steveklabnik
Copy link
Member

Triage: not aware of any changes here

@jyn514
Copy link
Member

jyn514 commented Dec 16, 2020

discussed at compiler team meeting. @eddyb raised the idea that rustdoc could just silently ignore the cases where we hit the existing limit, and treat them as unimplemented traits.

I wouldn't expect this to be possible currently, since rustc has a nasty habit of aborting the process when it hits the recursion limit: #79459

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants