tree: e25959960ff42e5372fd835ee3f4bbf60e1f9c58 [path history] [tgz]
  1. src/
  2. .android-checksum.json
  3. .cargo-checksum.json
  4. Android.bp
  5. build.rs
  6. Cargo.toml
  7. cargo_embargo.json
  8. LICENSE
  9. METADATA
  10. MODULE_LICENSE_MIT
  11. README.md
crates/doc-comment/README.md

doc-comment

Write doc comments from macros.

Usage example

// Of course, we need to import the `doc_comment` macro:
#[macro_use]
extern crate doc_comment;

// If you want to test examples in your README file.
doctest!("../README.md");

// If you want to test your README file ONLY on "cargo test":
#[cfg(doctest)]
doctest!("../README.md");

// If you want to document an item:
doc_comment!(concat!("fooo", "or not foo"), pub struct Foo {});

For more information, take a look at the documentation.