commit | 6d6982abe5e05fbf5a7581ddb020e756c126420f | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <[email protected]> | Thu Feb 02 22:21:17 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Thu Feb 02 22:21:17 2023 +0000 |
tree | 5dd052176f1219e66527f57d2d4847fd28cbdb5d | |
parent | ed82b2c0b01e9a2360f10c63c34a0651a5c95c50 [diff] | |
parent | 1e1e6f4198e7dd8c7e1ceeda523b491b197adf9e [diff] |
Upgrade document-features to 0.2.7 am: 86001b3c86 am: 959213af96 am: 1e1e6f4198 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/document-features/+/2417172 Change-Id: Icc1d7b03dfb16002fcc85f6d57a6e61b6d385b25 Signed-off-by: Automerger Merge Worker <[email protected]>
This crate provides a macro that extracts documentation comments from Cargo.toml
To use this crate, add #![doc = document_features::document_features!()]
in your crate documentation. The document_features!()
macro reads your Cargo.toml
file, extracts feature comments and generates a markdown string for your documentation.
Use ##
and #!
comments in your Cargo.toml to document features, for example:
[dependencies] document-features = "0.2" ## ... [features] ## The foo feature enables the `foo` functions foo = [] ## The bar feature enables the [`bar`] module bar = [] #! ### Experimental features #! The following features are experimental ## Activate the fusion reactor fusion = []
These comments keep the feature definition and documentation next to each other, and they are then rendered into your crate documentation.
Check out the documentation for more details.
Contributions are welcome. We accept pull requests and bug reports.
MIT OR Apache-2.0