diff --git a/Cargo.toml b/Cargo.toml index 79494b4..df45d21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.3.1" +version = "0.3.2" authors = ["Guillaume Gomez "] documentation = "http://docs.rs/crate/doc-comment" diff --git a/README.md b/README.md index 8c0992d..ed4e619 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ 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 {}); ````