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

Doc: enhance required feature highlight on the api items #704

Closed

Conversation

Mathieu-Lala
Copy link
Contributor

@Mathieu-Lala Mathieu-Lala commented Feb 10, 2023

Before :

image

After :

image

Summary of changes

I made those changed only in lib.rs but I suppose it should be done on every public item with a #[cfg(feature ...)]

@schungx
Copy link
Collaborator

schungx commented Feb 10, 2023

I vaguely remember that rustdoc will eventually put these feature flag tags onto APIs automatically... And so I have been waiting for the feature to land.

As it stands, I think the syntax is quite ugly and a mouthfu... not sure if we want to sprinkle those all across the codespace because if we do it, we probably should add it to all the public API as you mention.

Which actually is not a big deal. A lot of work, but just boilerplate type of work. When the auto feature lands, we can just do a global search and replace it with an empty line.

@Mathieu-Lala
Copy link
Contributor Author

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.

2 participants