-
Notifications
You must be signed in to change notification settings - Fork 0
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
Start RFC for doc cfg #2
Conversation
669ab52
to
6634eef
Compare
text/000-rustdoc-cfgs-handling.md
Outdated
#![doc(cfg_hide(doc))] | ||
``` | ||
|
||
Or directly on the item as it covers any of the item's children: |
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.
nit: mention modules somewhere too.
Has any consideration been given to this issue I ran into a while back? Basically, re-exports are fine on their own, but any methods or trait implementations on the re-exported item don't show the cfg required. Ideally, it would be possible to show the features in the crate being documented that result in a given item being enabled. This would require the feature resolver's logic to be pulled in, I presume, given that it is necessarily transitive. I'm unaware of how rustdoc handles all of this internally — I'm looking at it from my perspective as a crate maintainer. The underlying goal is to be able to do time-rs/time#350, which is effectively blocked on better re-exports. |
It probably should be discussed in this RFC, yes. |
Co-authored-by: León Orell Valerian Liehr <[email protected]> Co-authored-by: Michael Howell <[email protected]>
@fmease helped me finish writing the RFC. I have put him and @notriddle as co-author on the commit. Thanks everyone! Re-opening the issue on the rust rfcs repository. |
* minor typos * intro * motivation * guide * reference * implementation * alternates * rationale * future * whitespace
rendered