You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use doc_auto_cfg to show feature requirements on docs.rs
Add a `docsrs` config in the `docs.rs` metadata in Cargo.toml. This will
set `--cfg docsrs` when building on docs.rs. Enable the `doc_auto_cfg`
feature when the `docsrs` config is enabled. This feature is currently
unstable, but docs.rs uses a nightly compiler so this works fine.
The effect of this is that docs.rs will show a badge for items that are
only available if some feature is enabled. For example,
`BootServices::find_handles` will have a badge saying "Available on
crate feature exts only."
To view this locally, run this:
```
RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --all-features --open
```
This change has only been applied to the `uefi` package, since the
`uefi-macros` package does not have any features and the `uefi-services`
package's features don't control the visiblity of any public items.
#486
0 commit comments