aml_art_341514450 (11720836,com.google.android.art,com.google.android.go.art)
Make document-features available to product and vendor am: 9383c2a6e7 am: bbdf06e819 am: 4fbaa5d648 am: 34830c0646

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/document-features/+/2476171

Change-Id: I3ae8729f63152510ee2f28e655c9f450ffcb6011
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
tree: 7a26fe7060121f06633afbf29cad40dbc58ae5e2
  1. .github/
  2. tests/
  3. .cargo_vcs_info.json
  4. .gitignore
  5. Android.bp
  6. Cargo.toml
  7. Cargo.toml.orig
  8. cargo2android.json
  9. CHANGELOG.md
  10. lib.rs
  11. LICENSE-APACHE
  12. LICENSE-MIT
  13. METADATA
  14. MODULE_LICENSE_APACHE2
  15. OWNERS
  16. README.md
  17. rustfmt.toml
README.md

Document your crate's feature flags

Crates.io Documentation

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

Contributions are welcome. We accept pull requests and bug reports.

License

MIT OR Apache-2.0