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

Start RFC for doc cfg #2

Closed
wants to merge 1 commit into from
Closed

Start RFC for doc cfg #2

wants to merge 1 commit into from

Conversation

GuillaumeGomez
Copy link
Owner

@GuillaumeGomez GuillaumeGomez commented Dec 7, 2022

text/000-rustdoc-cfgs-handling.md Show resolved Hide resolved
#![doc(cfg_hide(doc))]
```

Or directly on the item as it covers any of the item's children:

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.

@jhpratt
Copy link

jhpratt commented Feb 23, 2023

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.

@Manishearth
Copy link

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]>
@GuillaumeGomez
Copy link
Owner Author

@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.

GuillaumeGomez pushed a commit that referenced this pull request Oct 3, 2024
* minor typos

* intro

* motivation

* guide

* reference

* implementation

* alternates

* rationale

* future

* whitespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants