-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Make feature(doc_auto_cfg)
work
#12642
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Definitely wanted something like this for quite some time due to how many compile time features we're accumulating.
The CI failure looks like a false positive, what could be triggering an allowed lint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to merge this once you can appease CI.
@alice-i-cecile It's my understanding that docs.rs already adds the "docsrs" attribute since (rust-lang/docs.rs#2390) so the metadata is unnecessary (which it why I didn't add it), but it doesn't hurt to have. |
Objective
![cfg_attr(docsrs, feature(doc_auto_cfg))]
was added. But to apply it it needs--cfg=docsrs
in rustdoc-args.Solution
--cfg=docsrs
to all crates and CI.I also added
[package.metadata.docs.rs]
to all crates to avoid adding code behind a feature and forget adding the metadata.Before:
After: