commit | 7d26f50aa3e38498d2e8fc892801bb1baa6432b4 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Wed Oct 11 20:18:01 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Wed Oct 11 20:18:01 2023 +0000 |
tree | 3d76baf576da4b2d34352ceb0dfe284da37dd45a | |
parent | 036c02632cbd88db085cefde15bdc3d492634f3a [diff] | |
parent | ec0ab808ed2288cb0725b0ca41f2c86814f0a17a [diff] |
Merge "Update Android.bp to reflect aosp/2763825" into main am: cf13d4fd17 am: 81035b0423 am: c1a62228c0 am: ed66b09d3b am: ec0ab808ed Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/document-features/+/2776439 Change-Id: I648cdd70c17560dc9e03fc816e867da74fabc3f2 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