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

Display feature information in documentation #241

Closed
anakrish opened this issue May 18, 2024 · 1 comment · Fixed by #248
Closed

Display feature information in documentation #241

anakrish opened this issue May 18, 2024 · 1 comment · Fixed by #248
Labels
documentation Improvements or additions to documentation

Comments

@anakrish
Copy link
Collaborator

In the public API for regorus in docs.rs, display that certain API is available only if a specific feature is available.
For example, https://docs.rs/regorus/latest/regorus/struct.Engine.html#method.get_coverage_report does not list that coverage feature is necessary for this API.

There has been an attempt to make this work:

# RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --no-deps

@mkulke What is the right way to do this?

@anakrish anakrish added the documentation Improvements or additions to documentation label May 18, 2024
@mkulke
Copy link

mkulke commented May 21, 2024

So, for the time being this relies on nightly and requires additional annotations, not sure if it will work reliably in all cases. stabilization for this doc feature is ongoing. However, it looks like in the current main the annotation is a bit off, when adjusting it, doc renders ok for that method:

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants