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 always show feature-gated types #113499

Closed
cdmistman opened this issue Jul 9, 2023 · 3 comments
Closed

Rustdoc doesn't always show feature-gated types #113499

cdmistman opened this issue Jul 9, 2023 · 3 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@cdmistman
Copy link

miette has several types that are feature-gated, such as GraphicalReportHandler, which aren't shown as feature-gated in documentation.

I expected this:
Screenshot 2023-07-09 at 12 20 18 AM

to contain a box saying fancy-no-backtrace next to the GraphicalReportHandler link as shown eg in this screenshot from the tokio docs
Screenshot 2023-07-09 at 12 21 40 AM

@cdmistman cdmistman added the C-bug Category: This is a bug. label Jul 9, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 9, 2023
@Noratrieb
Copy link
Member

Tokio does this using an unstable feature called doc_cfg.

@Noratrieb Noratrieb added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. and removed C-bug Category: This is a bug. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 9, 2023
@GuillaumeGomez
Copy link
Member

I'm waiting for help to finish the RFC. In the meantime, you can use doc_auto_cfg feature so it's filled automatically.

@GuillaumeGomez
Copy link
Member

Tracking issue is #43781. Closing then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. 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

4 participants