diff --git a/Cargo.toml b/Cargo.toml index 5e6cbad73..e02c2dca5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,3 +34,4 @@ rand = "0.6" rand_xorshift = "0.1" serde = "1" serde_derive = "1" +doc-comment = "0.3" diff --git a/README.md b/README.md index 9d820d914..c669e7ad2 100644 --- a/README.md +++ b/README.md @@ -104,14 +104,14 @@ command to get a visualization of an nbody simulation. To see the effect of using Rayon, press `s` to run sequentially and `p` to run in parallel. -``` +```text > cd rayon-demo > cargo run --release -- nbody visualize ``` For more information on demos, try: -``` +```text > cd rayon-demo > cargo run --release -- --help ``` diff --git a/rayon-core/src/compile_fail/scope_join_bad.rs b/rayon-core/src/compile_fail/scope_join_bad.rs index 91eef0579..75e4c5ca6 100644 --- a/rayon-core/src/compile_fail/scope_join_bad.rs +++ b/rayon-core/src/compile_fail/scope_join_bad.rs @@ -1,4 +1,4 @@ -/*! ```compile_fail,E0597 +/*! ```compile_fail,E0373 fn bad_scope(f: F) where F: FnOnce(&i32) + Send, diff --git a/rayon-futures/src/compile_fail/future_escape.rs b/rayon-futures/src/compile_fail/future_escape.rs index aa77d59b0..6cda4226b 100644 --- a/rayon-futures/src/compile_fail/future_escape.rs +++ b/rayon-futures/src/compile_fail/future_escape.rs @@ -1,4 +1,4 @@ -/*! ```compile_fail,E0501,E0382,E0597 +/*! ```compile_fail,E0382,E0501,E0503,E0716 extern crate futures; extern crate rayon_core; diff --git a/src/lib.rs b/src/lib.rs index 51487f850..39a88f0a0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -85,6 +85,12 @@ extern crate rayon_core; extern crate rand; #[cfg(test)] extern crate rand_xorshift; +#[cfg(test)] +#[macro_use] +extern crate doc_comment; + +#[cfg(test)] +doctest!("../README.md"); #[macro_use] mod delegate;