regorus icon indicating copy to clipboard operation
regorus copied to clipboard

Display feature information in documentation

Open anakrish opened this issue 1 year ago • 1 comments

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: https://github.com/microsoft/regorus/blob/56bd8841d09120366f5aebd58a12ad84602210d7/Cargo.toml#L165

@mkulke What is the right way to do this?

anakrish avatar May 18 '24 15:05 anakrish

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

mkulke avatar May 21 '24 12:05 mkulke