-
Notifications
You must be signed in to change notification settings - Fork 14k
Description
Currently, rustdoc has some hardcoded logic to render doc(cfg(...)) in:
rust/src/librustdoc/clean/cfg.rs
Line 464 in 4f0c568
| Cfg::Cfg(name, value) => { |
rustdoc could also take a map of config options to "rendered strings" (passed as e.g. a file via the command line), so that one may have:
This is supported on Networking only.
instead of:
This is supported on
CONFIG_NETonly.
Ideally, there could be also be one for the "short" name (that goes in the index) and the "long" name (that goes inside the item); and perhaps even allow for Markdown and to provide a custom formatting string (so that the message can be customized), e.g. it could be used to have something like:
Supported when My Driver (
CONFIG_MY_DRIVER) is enabled.
Supported when My Driver (CONFIG_MY_DRIVER) is enabled as a module (M).
Supported when My Driver (CONFIG_MY_DRIVER) is enabled as a built-in (Y).