rust-lang-nursery / lazy-static.rs

A small macro for defining lazy evaluated static variables in Rust.
Apache License 2.0
1.9k stars 111 forks source link

Automatically check if README.md examples are working when running "cargo test" #145

Closed GuillaumeGomez closed 5 years ago

GuillaumeGomez commented 5 years ago

Since rustdoc nightly now provides "cfg(test)" when running on test mode, we can now use this macro on test mode only to check if README.md examples are working as expected.

GuillaumeGomez commented 5 years ago

I don't know how to support rust 1.24 though... There is no way to check for the current rust version (unless checking it into the build.rs?) because rust 2015 (and 2018 of course) are working fine. If anyone has an idea...

GuillaumeGomez commented 5 years ago

My last update seems like it fixed it. :)