That's included in Rust![1]
Code examples from the documentation automatically become "documentation tests" to make sure your examples are still up to date when updating your code.
[1] https://doc.rust-lang.org/rustdoc/documentation-tests.html
Code examples from the documentation automatically become "documentation tests" to make sure your examples are still up to date when updating your code.
[1] https://doc.rust-lang.org/rustdoc/documentation-tests.html
#[cfg(doctest)]
#[macro_use]
extern crate doc_comment;
#[cfg(doctest)]
doctest!("../README.md");
Now, the readme examples are tested like everything else.https://github.com/rust-lang-nursery/lazy-static.rs/blob/mas...