diff --git a/tokio-sync/benches/mpsc.rs b/tokio-sync/benches/mpsc.rs index d83ae475c..bb351d3e5 100644 --- a/tokio-sync/benches/mpsc.rs +++ b/tokio-sync/benches/mpsc.rs @@ -1,4 +1,5 @@ #![feature(test)] +#![cfg_attr(test, deny(warnings))] extern crate tokio_sync; extern crate futures; @@ -51,7 +52,7 @@ mod tokio { #[bench] fn bounded_tx_poll_ready(b: &mut Bencher) { - let (mut tx, rx) = channel::(1); + let (mut tx, _rx) = channel::(1); b.iter(|| { future::lazy(|| { assert!(tx.poll_ready().unwrap().is_ready()); @@ -63,7 +64,7 @@ mod tokio { #[bench] fn bounded_tx_poll_not_ready(b: &mut Bencher) { - let (mut tx, rx) = channel::(1); + let (mut tx, _rx) = channel::(1); tx.try_send(1).unwrap(); b.iter(|| { future::lazy(|| { @@ -163,7 +164,7 @@ mod tokio { .take(4 * 1_000); for v in rx { - test::black_box(v); + let _ = test::black_box(v); } }); @@ -209,7 +210,7 @@ mod tokio { .take(THREADS * ITERS); for v in rx { - test::black_box(v); + let _ = test::black_box(v); } }); @@ -268,7 +269,7 @@ mod legacy { #[bench] fn bounded_tx_poll_ready(b: &mut Bencher) { - let (mut tx, rx) = channel::(0); + let (mut tx, _rx) = channel::(0); b.iter(|| { future::lazy(|| { assert!(tx.poll_ready().unwrap().is_ready()); @@ -280,7 +281,7 @@ mod legacy { #[bench] fn bounded_tx_poll_not_ready(b: &mut Bencher) { - let (mut tx, rx) = channel::(0); + let (mut tx, _rx) = channel::(0); tx.try_send(1).unwrap(); b.iter(|| { future::lazy(|| { @@ -379,7 +380,7 @@ mod legacy { .take(4 * 1_000); for v in rx { - test::black_box(v); + let _ = test::black_box(v); } }); @@ -425,7 +426,7 @@ mod legacy { .take(THREADS * ITERS); for v in rx { - test::black_box(v); + let _ = test::black_box(v); } }); diff --git a/tokio-sync/benches/oneshot.rs b/tokio-sync/benches/oneshot.rs index 97dd1ee94..873eb1e80 100644 --- a/tokio-sync/benches/oneshot.rs +++ b/tokio-sync/benches/oneshot.rs @@ -1,4 +1,5 @@ #![feature(test)] +#![cfg_attr(test, deny(warnings))] extern crate tokio_sync; extern crate futures; diff --git a/tokio-sync/tests/atomic_task.rs b/tokio-sync/tests/atomic_task.rs index d630e3ea9..cfe91e1af 100644 --- a/tokio-sync/tests/atomic_task.rs +++ b/tokio-sync/tests/atomic_task.rs @@ -1,3 +1,5 @@ +#![deny(warnings)] + extern crate futures; extern crate tokio_mock_task; extern crate tokio_sync; diff --git a/tokio-sync/tests/fuzz_atomic_task.rs b/tokio-sync/tests/fuzz_atomic_task.rs index 961d16df9..1ba1a7751 100644 --- a/tokio-sync/tests/fuzz_atomic_task.rs +++ b/tokio-sync/tests/fuzz_atomic_task.rs @@ -1,7 +1,10 @@ +#![deny(warnings)] + extern crate futures; #[macro_use] extern crate loom; +#[allow(dead_code)] #[path = "../src/task/atomic_task.rs"] mod atomic_task; diff --git a/tokio-sync/tests/fuzz_list.rs b/tokio-sync/tests/fuzz_list.rs index d0207ccb6..43799020e 100644 --- a/tokio-sync/tests/fuzz_list.rs +++ b/tokio-sync/tests/fuzz_list.rs @@ -1,3 +1,5 @@ +#![deny(warnings)] + extern crate futures; #[macro_use] extern crate loom; diff --git a/tokio-sync/tests/fuzz_oneshot.rs b/tokio-sync/tests/fuzz_oneshot.rs index 1b8cbe33a..2d3bda96a 100644 --- a/tokio-sync/tests/fuzz_oneshot.rs +++ b/tokio-sync/tests/fuzz_oneshot.rs @@ -1,3 +1,5 @@ +#![deny(warnings)] + extern crate futures; extern crate loom; diff --git a/tokio-sync/tests/fuzz_semaphore.rs b/tokio-sync/tests/fuzz_semaphore.rs index 9bd88467f..aa0480974 100644 --- a/tokio-sync/tests/fuzz_semaphore.rs +++ b/tokio-sync/tests/fuzz_semaphore.rs @@ -1,3 +1,5 @@ +#![deny(warnings)] + #[macro_use] extern crate futures; #[macro_use] diff --git a/tokio-sync/tests/mpsc.rs b/tokio-sync/tests/mpsc.rs index 5083e4ccf..f58305e0b 100644 --- a/tokio-sync/tests/mpsc.rs +++ b/tokio-sync/tests/mpsc.rs @@ -1,3 +1,5 @@ +#![deny(warnings)] + extern crate futures; extern crate tokio_mock_task; extern crate tokio_sync; diff --git a/tokio-sync/tests/oneshot.rs b/tokio-sync/tests/oneshot.rs index 3919d8589..2413f909a 100644 --- a/tokio-sync/tests/oneshot.rs +++ b/tokio-sync/tests/oneshot.rs @@ -1,3 +1,5 @@ +#![deny(warnings)] + extern crate futures; extern crate tokio_mock_task; extern crate tokio_sync; diff --git a/tokio-sync/tests/semaphore.rs b/tokio-sync/tests/semaphore.rs index 74e98cbb3..2249045f2 100644 --- a/tokio-sync/tests/semaphore.rs +++ b/tokio-sync/tests/semaphore.rs @@ -1,3 +1,5 @@ +#![deny(warnings)] + extern crate futures; extern crate tokio_mock_task; extern crate tokio_sync;