diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 22cd40e13..6e9459857 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,6 +3,7 @@ pr: ["master", "std-future"] variables: nightly: nightly-2019-07-17 + RUSTFLAGS: -Dwarnings jobs: # Check formatting diff --git a/ci/azure-clippy.yml b/ci/azure-clippy.yml index 11a1cf751..c43615560 100644 --- a/ci/azure-clippy.yml +++ b/ci/azure-clippy.yml @@ -12,5 +12,5 @@ jobs: cargo clippy --version displayName: Install clippy - script: | - cargo clippy --all --all-features -- -D warnings -A clippy::mutex-atomic + cargo clippy --all --all-features -- -A clippy::mutex-atomic displayName: cargo clippy --all diff --git a/tokio-buf/src/lib.rs b/tokio-buf/src/lib.rs index ce65f2b12..1d63c2034 100644 --- a/tokio-buf/src/lib.rs +++ b/tokio-buf/src/lib.rs @@ -1,11 +1,10 @@ #![doc(html_root_url = "https://docs.rs/tokio-buf/0.2.0-alpha.1")] -#![deny( +#![warn( missing_docs, missing_debug_implementations, unreachable_pub, rust_2018_idioms )] -#![cfg_attr(test, deny(warnings))] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] //! Asynchronous stream of bytes. diff --git a/tokio-codec/src/lib.rs b/tokio-codec/src/lib.rs index c1a149bbe..8e1802b8b 100644 --- a/tokio-codec/src/lib.rs +++ b/tokio-codec/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-codec/0.2.0-alpha.1")] -#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] //! Utilities for encoding and decoding frames. diff --git a/tokio-codec/tests/codecs.rs b/tokio-codec/tests/codecs.rs index 6a5117158..f4b79dbd4 100644 --- a/tokio-codec/tests/codecs.rs +++ b/tokio-codec/tests/codecs.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use bytes::{BufMut, Bytes, BytesMut}; use tokio_codec::{BytesCodec, Decoder, Encoder, LinesCodec}; diff --git a/tokio-codec/tests/framed.rs b/tokio-codec/tests/framed.rs index 624f8ffb9..fd9308907 100644 --- a/tokio-codec/tests/framed.rs +++ b/tokio-codec/tests/framed.rs @@ -1,5 +1,5 @@ #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio::prelude::*; use tokio_codec::{Decoder, Encoder, Framed, FramedParts}; diff --git a/tokio-codec/tests/framed_read.rs b/tokio-codec/tests/framed_read.rs index e4ef53c28..4215c04cb 100644 --- a/tokio-codec/tests/framed_read.rs +++ b/tokio-codec/tests/framed_read.rs @@ -1,5 +1,5 @@ #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio::prelude::*; use tokio_codec::{Decoder, FramedRead}; diff --git a/tokio-codec/tests/framed_write.rs b/tokio-codec/tests/framed_write.rs index c15951540..9d85c4d83 100644 --- a/tokio-codec/tests/framed_write.rs +++ b/tokio-codec/tests/framed_write.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio_codec::{Encoder, FramedWrite}; use tokio_io::AsyncWrite; diff --git a/tokio-codec/tests/length_delimited.rs b/tokio-codec/tests/length_delimited.rs index 8c1eaed23..404786e31 100644 --- a/tokio-codec/tests/length_delimited.rs +++ b/tokio-codec/tests/length_delimited.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio::codec::*; use tokio::io::{AsyncRead, AsyncWrite}; diff --git a/tokio-current-thread/src/lib.rs b/tokio-current-thread/src/lib.rs index 004e746e4..483b1fd07 100644 --- a/tokio-current-thread/src/lib.rs +++ b/tokio-current-thread/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-current-thread/0.2.0-alpha.1")] -#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] //! A single-threaded executor which executes tasks on the same thread from which diff --git a/tokio-current-thread/tests/current_thread.rs b/tokio-current-thread/tests/current_thread.rs index 49a407068..a2ec5ce6d 100644 --- a/tokio-current-thread/tests/current_thread.rs +++ b/tokio-current-thread/tests/current_thread.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use std::any::Any; diff --git a/tokio-executor/src/lib.rs b/tokio-executor/src/lib.rs index 8ae4e1ffb..aceb6efe3 100644 --- a/tokio-executor/src/lib.rs +++ b/tokio-executor/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-executor/0.2.0-alpha.1")] -#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] //! Task execution related traits and utilities. diff --git a/tokio-executor/tests/enter.rs b/tokio-executor/tests/enter.rs index c0586d666..25ef60069 100644 --- a/tokio-executor/tests/enter.rs +++ b/tokio-executor/tests/enter.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(await_macro, async_await)] #[test] diff --git a/tokio-executor/tests/executor.rs b/tokio-executor/tests/executor.rs index 930f91162..608db1578 100644 --- a/tokio-executor/tests/executor.rs +++ b/tokio-executor/tests/executor.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(await_macro, async_await)] use tokio_executor::{self, DefaultExecutor}; diff --git a/tokio-fs/examples_old/std-echo.rs b/tokio-fs/examples_old/std-echo.rs index 0b55c1297..774cec14a 100644 --- a/tokio-fs/examples_old/std-echo.rs +++ b/tokio-fs/examples_old/std-echo.rs @@ -1,5 +1,4 @@ //! Echo everything received on STDIN to STDOUT. -#![deny(deprecated, warnings)] #![feature(async_await)] use tokio_codec::{FramedRead, FramedWrite, LinesCodec}; diff --git a/tokio-fs/src/lib.rs b/tokio-fs/src/lib.rs index 669f2463f..46387e1c8 100644 --- a/tokio-fs/src/lib.rs +++ b/tokio-fs/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-fs/0.2.0-alpha.1")] -#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] #![feature(async_await)] diff --git a/tokio-fs/tests/dir.rs b/tokio-fs/tests/dir.rs index 3e7a7c156..48242d5ae 100644 --- a/tokio-fs/tests/dir.rs +++ b/tokio-fs/tests/dir.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use futures_util::future; diff --git a/tokio-fs/tests/file.rs b/tokio-fs/tests/file.rs index 480053d4f..1a2c89f14 100644 --- a/tokio-fs/tests/file.rs +++ b/tokio-fs/tests/file.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use rand::{distributions, thread_rng, Rng}; diff --git a/tokio-fs/tests/link.rs b/tokio-fs/tests/link.rs index 200221ecc..4350eac6a 100644 --- a/tokio-fs/tests/link.rs +++ b/tokio-fs/tests/link.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use std::fs; diff --git a/tokio-io/src/lib.rs b/tokio-io/src/lib.rs index 968f224ef..67918b0b3 100644 --- a/tokio-io/src/lib.rs +++ b/tokio-io/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-io/0.2.0-alpha.1")] -#![deny(missing_debug_implementations, missing_docs, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_debug_implementations, missing_docs, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] //! Core I/O traits and combinators when working with Tokio. diff --git a/tokio-io/tests/copy.rs b/tokio-io/tests/copy.rs index 8173084f8..73bef3934 100644 --- a/tokio-io/tests/copy.rs +++ b/tokio-io/tests/copy.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_io::{AsyncRead, AsyncReadExt}; diff --git a/tokio-io/tests/lines.rs b/tokio-io/tests/lines.rs index 940989731..23bb8a462 100644 --- a/tokio-io/tests/lines.rs +++ b/tokio-io/tests/lines.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use futures_util::StreamExt; diff --git a/tokio-io/tests/read.rs b/tokio-io/tests/read.rs index b928bc784..f4607f062 100644 --- a/tokio-io/tests/read.rs +++ b/tokio-io/tests/read.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_io::{AsyncRead, AsyncReadExt}; diff --git a/tokio-io/tests/read_exact.rs b/tokio-io/tests/read_exact.rs index 2a23073ba..e3d5ee11e 100644 --- a/tokio-io/tests/read_exact.rs +++ b/tokio-io/tests/read_exact.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_io::AsyncReadExt; diff --git a/tokio-io/tests/read_line.rs b/tokio-io/tests/read_line.rs index 13d0e5c40..b24448b18 100644 --- a/tokio-io/tests/read_line.rs +++ b/tokio-io/tests/read_line.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use std::io::Cursor; diff --git a/tokio-io/tests/read_to_end.rs b/tokio-io/tests/read_to_end.rs index e46c4935c..1a79e099f 100644 --- a/tokio-io/tests/read_to_end.rs +++ b/tokio-io/tests/read_to_end.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_io::AsyncReadExt; diff --git a/tokio-io/tests/read_to_string.rs b/tokio-io/tests/read_to_string.rs index 2a75a5c13..69ee826d3 100644 --- a/tokio-io/tests/read_to_string.rs +++ b/tokio-io/tests/read_to_string.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_io::AsyncReadExt; diff --git a/tokio-io/tests/read_until.rs b/tokio-io/tests/read_until.rs index 9f7522c65..3716851b4 100644 --- a/tokio-io/tests/read_until.rs +++ b/tokio-io/tests/read_until.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_io::AsyncBufReadExt; diff --git a/tokio-io/tests/write.rs b/tokio-io/tests/write.rs index f4a582903..e572100c4 100644 --- a/tokio-io/tests/write.rs +++ b/tokio-io/tests/write.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_io::{AsyncWrite, AsyncWriteExt}; diff --git a/tokio-io/tests/write_all.rs b/tokio-io/tests/write_all.rs index 549027522..ca9a478b6 100644 --- a/tokio-io/tests/write_all.rs +++ b/tokio-io/tests/write_all.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_io::{AsyncWrite, AsyncWriteExt}; diff --git a/tokio-macros/src/lib.rs b/tokio-macros/src/lib.rs index ccb6ae7d5..991558f7e 100644 --- a/tokio-macros/src/lib.rs +++ b/tokio-macros/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-macros/0.2.0-alpha.1")] -#![deny(missing_debug_implementations, unreachable_pub, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_debug_implementations, unreachable_pub, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] //! Macros for use with Tokio diff --git a/tokio-process/src/lib.rs b/tokio-process/src/lib.rs index b52cf947c..31018ffec 100644 --- a/tokio-process/src/lib.rs +++ b/tokio-process/src/lib.rs @@ -118,8 +118,7 @@ //! be regained with the `Child::forget` method. #![doc(html_root_url = "https://docs.rs/tokio-process/0.3.0")] -#![deny(missing_debug_implementations, missing_docs, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_debug_implementations, missing_docs, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] #![feature(async_await)] diff --git a/tokio-process/tests/issue_42.rs b/tokio-process/tests/issue_42.rs index 77deae7e9..48e734278 100644 --- a/tokio-process/tests/issue_42.rs +++ b/tokio-process/tests/issue_42.rs @@ -1,5 +1,5 @@ #![cfg(unix)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use futures_util::future::FutureExt; use futures_util::stream::FuturesOrdered; diff --git a/tokio-process/tests/smoke.rs b/tokio-process/tests/smoke.rs index d4d2189e1..e9ac5f078 100644 --- a/tokio-process/tests/smoke.rs +++ b/tokio-process/tests/smoke.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_process::CommandExt; diff --git a/tokio-process/tests/stdio.rs b/tokio-process/tests/stdio.rs index f26cbd8a7..6eb5205a4 100644 --- a/tokio-process/tests/stdio.rs +++ b/tokio-process/tests/stdio.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] #[macro_use] diff --git a/tokio-process/tests/support/mod.rs b/tokio-process/tests/support/mod.rs index 0d38a6805..030fb58a2 100644 --- a/tokio-process/tests/support/mod.rs +++ b/tokio-process/tests/support/mod.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use futures_util::future; use futures_util::future::FutureExt; diff --git a/tokio-reactor/benches/basic.rs b/tokio-reactor/benches/basic.rs index 23424229f..110a0d86f 100644 --- a/tokio-reactor/benches/basic.rs +++ b/tokio-reactor/benches/basic.rs @@ -1,5 +1,5 @@ #![feature(test)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] /* extern crate test; diff --git a/tokio-reactor/src/lib.rs b/tokio-reactor/src/lib.rs index ca15d2b57..d583b1d04 100644 --- a/tokio-reactor/src/lib.rs +++ b/tokio-reactor/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-reactor/0.2.0-alpha.1")] -#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] //! Event loop that drives Tokio I/O resources. diff --git a/tokio-signal/examples/ctrl-c.rs b/tokio-signal/examples/ctrl-c.rs index 740b6c014..48aede053 100644 --- a/tokio-signal/examples/ctrl-c.rs +++ b/tokio-signal/examples/ctrl-c.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use futures_util::stream::StreamExt; diff --git a/tokio-signal/examples/multiple.rs b/tokio-signal/examples/multiple.rs index 996af50d6..c1ba96c26 100644 --- a/tokio-signal/examples/multiple.rs +++ b/tokio-signal/examples/multiple.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] //! A small example of how to listen for two signals at the same time diff --git a/tokio-signal/examples/sighup-example.rs b/tokio-signal/examples/sighup-example.rs index 5762d6878..6ee46a9d0 100644 --- a/tokio-signal/examples/sighup-example.rs +++ b/tokio-signal/examples/sighup-example.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] // A trick to not fail build on non-unix platforms when using unix-specific features. diff --git a/tokio-signal/src/lib.rs b/tokio-signal/src/lib.rs index 56f0d1abb..f7715a77b 100644 --- a/tokio-signal/src/lib.rs +++ b/tokio-signal/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-signal/0.3.0-alpha.1")] -#![deny(missing_debug_implementations, missing_docs, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_debug_implementations, missing_docs, rust_2018_idioms)] #![cfg_attr(test, feature(async_await))] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] diff --git a/tokio-signal/tests/drop_multi_loop.rs b/tokio-signal/tests/drop_multi_loop.rs index 1ba338cf8..fa04bc077 100644 --- a/tokio-signal/tests/drop_multi_loop.rs +++ b/tokio-signal/tests/drop_multi_loop.rs @@ -1,5 +1,5 @@ #![cfg(unix)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use libc; diff --git a/tokio-signal/tests/drop_then_get_a_signal.rs b/tokio-signal/tests/drop_then_get_a_signal.rs index 6f5a628c9..0573d6b9d 100644 --- a/tokio-signal/tests/drop_then_get_a_signal.rs +++ b/tokio-signal/tests/drop_then_get_a_signal.rs @@ -1,5 +1,5 @@ #![cfg(unix)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use libc; diff --git a/tokio-signal/tests/dropping_does_not_deregister_other_instances.rs b/tokio-signal/tests/dropping_does_not_deregister_other_instances.rs index ca8bb1b0c..2b80d1143 100644 --- a/tokio-signal/tests/dropping_does_not_deregister_other_instances.rs +++ b/tokio-signal/tests/dropping_does_not_deregister_other_instances.rs @@ -1,5 +1,5 @@ #![cfg(unix)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use libc; diff --git a/tokio-signal/tests/multi_loop.rs b/tokio-signal/tests/multi_loop.rs index 1d75e873f..2fbf44155 100644 --- a/tokio-signal/tests/multi_loop.rs +++ b/tokio-signal/tests/multi_loop.rs @@ -1,5 +1,5 @@ #![cfg(unix)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] pub mod support; use crate::support::*; diff --git a/tokio-signal/tests/notify_both.rs b/tokio-signal/tests/notify_both.rs index 6b82df7aa..9927bf054 100644 --- a/tokio-signal/tests/notify_both.rs +++ b/tokio-signal/tests/notify_both.rs @@ -1,5 +1,5 @@ #![cfg(unix)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] pub mod support; diff --git a/tokio-signal/tests/simple.rs b/tokio-signal/tests/simple.rs index 1456cb61d..9eafe5961 100644 --- a/tokio-signal/tests/simple.rs +++ b/tokio-signal/tests/simple.rs @@ -1,5 +1,5 @@ #![cfg(unix)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] pub mod support; diff --git a/tokio-signal/tests/support.rs b/tokio-signal/tests/support.rs index a7d4204b8..ee6387a51 100644 --- a/tokio-signal/tests/support.rs +++ b/tokio-signal/tests/support.rs @@ -1,5 +1,5 @@ #![cfg(unix)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use futures_util::future::FutureExt; use libc::{c_int, getpid, kill}; diff --git a/tokio-signal/tests/twice.rs b/tokio-signal/tests/twice.rs index a51478bc5..edef0d0c1 100644 --- a/tokio-signal/tests/twice.rs +++ b/tokio-signal/tests/twice.rs @@ -1,5 +1,5 @@ #![cfg(unix)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] pub mod support; diff --git a/tokio-sync/benches/mpsc.rs b/tokio-sync/benches/mpsc.rs index 4751b3c0b..5e05f6687 100644 --- a/tokio-sync/benches/mpsc.rs +++ b/tokio-sync/benches/mpsc.rs @@ -1,5 +1,5 @@ #![feature(test)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] extern crate test; diff --git a/tokio-sync/benches/oneshot.rs b/tokio-sync/benches/oneshot.rs index c2f0ef4bb..d2f7b3795 100644 --- a/tokio-sync/benches/oneshot.rs +++ b/tokio-sync/benches/oneshot.rs @@ -1,5 +1,5 @@ #![feature(test)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] extern crate test; diff --git a/tokio-sync/src/lib.rs b/tokio-sync/src/lib.rs index a84a47891..be71a3e43 100644 --- a/tokio-sync/src/lib.rs +++ b/tokio-sync/src/lib.rs @@ -1,11 +1,10 @@ #![doc(html_root_url = "https://docs.rs/tokio-sync/0.2.0-alpha.1")] -#![deny( +#![warn( missing_debug_implementations, missing_docs, unreachable_pub, rust_2018_idioms )] -#![cfg_attr(test, deny(warnings))] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] #![feature(async_await)] diff --git a/tokio-sync/src/watch.rs b/tokio-sync/src/watch.rs index 0c2bb243a..4fec69473 100644 --- a/tokio-sync/src/watch.rs +++ b/tokio-sync/src/watch.rs @@ -60,14 +60,16 @@ use crate::task::AtomicWaker; use core::task::Poll::{Pending, Ready}; use core::task::{Context, Poll}; use fnv::FnvHashMap; -use futures_core::ready; use futures_util::future::poll_fn; -use futures_util::pin_mut; use std::ops; use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering::SeqCst; use std::sync::{Arc, Mutex, RwLock, RwLockReadGuard, Weak}; +#[cfg(feature = "async-traits")] +use futures_core::ready; +#[cfg(feature = "async-traits")] +use futures_util::pin_mut; #[cfg(feature = "async-traits")] use std::pin::Pin; diff --git a/tokio-sync/tests/atomic_waker.rs b/tokio-sync/tests/atomic_waker.rs index ffd3cc26a..5d3863309 100644 --- a/tokio-sync/tests/atomic_waker.rs +++ b/tokio-sync/tests/atomic_waker.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use std::task::Waker; use tokio_sync::AtomicWaker; diff --git a/tokio-sync/tests/errors.rs b/tokio-sync/tests/errors.rs index 2afafc1f6..38ac1bf68 100644 --- a/tokio-sync/tests/errors.rs +++ b/tokio-sync/tests/errors.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] fn is_error() {} diff --git a/tokio-sync/tests/fuzz_atomic_waker.rs b/tokio-sync/tests/fuzz_atomic_waker.rs index b53f90dac..de274d32c 100644 --- a/tokio-sync/tests/fuzz_atomic_waker.rs +++ b/tokio-sync/tests/fuzz_atomic_waker.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #[macro_use] extern crate loom; diff --git a/tokio-sync/tests/fuzz_list.rs b/tokio-sync/tests/fuzz_list.rs index e0a55473d..fa1e9f5e1 100644 --- a/tokio-sync/tests/fuzz_list.rs +++ b/tokio-sync/tests/fuzz_list.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #[macro_use] extern crate loom; diff --git a/tokio-sync/tests/fuzz_mpsc.rs b/tokio-sync/tests/fuzz_mpsc.rs index d59f3fedf..d33978103 100644 --- a/tokio-sync/tests/fuzz_mpsc.rs +++ b/tokio-sync/tests/fuzz_mpsc.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] #[macro_use] diff --git a/tokio-sync/tests/fuzz_oneshot.rs b/tokio-sync/tests/fuzz_oneshot.rs index 315164781..ae990a0c9 100644 --- a/tokio-sync/tests/fuzz_oneshot.rs +++ b/tokio-sync/tests/fuzz_oneshot.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] #[path = "../src/oneshot.rs"] diff --git a/tokio-sync/tests/fuzz_semaphore.rs b/tokio-sync/tests/fuzz_semaphore.rs index 5858fd204..018fa0a98 100644 --- a/tokio-sync/tests/fuzz_semaphore.rs +++ b/tokio-sync/tests/fuzz_semaphore.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #[macro_use] extern crate loom; diff --git a/tokio-sync/tests/lock.rs b/tokio-sync/tests/lock.rs index af318a156..65ecf142f 100644 --- a/tokio-sync/tests/lock.rs +++ b/tokio-sync/tests/lock.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio_sync::Lock; use tokio_test::task::spawn; diff --git a/tokio-sync/tests/mpsc.rs b/tokio-sync/tests/mpsc.rs index e18464a80..8f1ff307b 100644 --- a/tokio-sync/tests/mpsc.rs +++ b/tokio-sync/tests/mpsc.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_sync::mpsc; diff --git a/tokio-sync/tests/oneshot.rs b/tokio-sync/tests/oneshot.rs index 615373dd3..77e02d8cf 100644 --- a/tokio-sync/tests/oneshot.rs +++ b/tokio-sync/tests/oneshot.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_sync::oneshot; diff --git a/tokio-sync/tests/semaphore.rs b/tokio-sync/tests/semaphore.rs index a19f261a4..c1280f36c 100644 --- a/tokio-sync/tests/semaphore.rs +++ b/tokio-sync/tests/semaphore.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio_sync::semaphore::{Permit, Semaphore}; use tokio_test::task::MockTask; diff --git a/tokio-sync/tests/watch.rs b/tokio-sync/tests/watch.rs index 3be309386..573a3af0b 100644 --- a/tokio-sync/tests/watch.rs +++ b/tokio-sync/tests/watch.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio_sync::watch; use tokio_test::task::spawn; diff --git a/tokio-tcp/src/lib.rs b/tokio-tcp/src/lib.rs index b89cfc2fb..1e8ca2f50 100644 --- a/tokio-tcp/src/lib.rs +++ b/tokio-tcp/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-tcp/0.2.0-alpha.1")] -#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] #![feature(async_await)] diff --git a/tokio-tcp/tests/echo.rs b/tokio-tcp/tests/echo.rs index cb7e8b02e..0a0c87cae 100644 --- a/tokio-tcp/tests/echo.rs +++ b/tokio-tcp/tests/echo.rs @@ -1,5 +1,5 @@ #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio::net::{TcpListener, TcpStream}; use tokio::prelude::*; diff --git a/tokio-tcp/tests/tcp.rs b/tokio-tcp/tests/tcp.rs index e95768d84..3d2316d93 100644 --- a/tokio-tcp/tests/tcp.rs +++ b/tokio-tcp/tests/tcp.rs @@ -1,5 +1,5 @@ #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio::net::{TcpListener, TcpStream}; use tokio::sync::oneshot; diff --git a/tokio-tcp/tests/tcp_accept.rs b/tokio-tcp/tests/tcp_accept.rs index 3a7d9f652..a31096c87 100644 --- a/tokio-tcp/tests/tcp_accept.rs +++ b/tokio-tcp/tests/tcp_accept.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio::net::{TcpListener, TcpStream}; diff --git a/tokio-tcp/tests/tcp_peek.rs b/tokio-tcp/tests/tcp_peek.rs index 829254ef4..60f0c76d3 100644 --- a/tokio-tcp/tests/tcp_peek.rs +++ b/tokio-tcp/tests/tcp_peek.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use std::thread; diff --git a/tokio-test/src/lib.rs b/tokio-test/src/lib.rs index a24277aaa..4d8539bd4 100644 --- a/tokio-test/src/lib.rs +++ b/tokio-test/src/lib.rs @@ -1,11 +1,10 @@ #![doc(html_root_url = "https://docs.rs/tokio-test/0.2.0-alpha.1")] -#![deny( +#![warn( missing_docs, missing_debug_implementations, unreachable_pub, rust_2018_idioms )] -#![cfg_attr(test, deny(warnings))] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] //! Tokio and Futures based testing utilites diff --git a/tokio-test/tests/clock.rs b/tokio-test/tests/clock.rs index 082ce311a..915f6899e 100644 --- a/tokio-test/tests/clock.rs +++ b/tokio-test/tests/clock.rs @@ -1,5 +1,5 @@ #![cfg(feature = "broken")] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use futures::Future; use std::time::{Duration, Instant}; diff --git a/tokio-test/tests/io.rs b/tokio-test/tests/io.rs index 00044e83f..93c9dc298 100644 --- a/tokio-test/tests/io.rs +++ b/tokio-test/tests/io.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio::io::{AsyncReadExt, AsyncWriteExt}; diff --git a/tokio-test/tests/macros.rs b/tokio-test/tests/macros.rs index ea3e5b5c4..a33fbad8a 100644 --- a/tokio-test/tests/macros.rs +++ b/tokio-test/tests/macros.rs @@ -1,5 +1,5 @@ #![cfg(feature = "broken")] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use futures::{future, Async, Future, Poll}; use tokio_macros::{assert_not_ready, assert_ready, assert_ready_eq}; diff --git a/tokio-threadpool/benches/basic.rs b/tokio-threadpool/benches/basic.rs index c49f6a8e4..9073e0797 100644 --- a/tokio-threadpool/benches/basic.rs +++ b/tokio-threadpool/benches/basic.rs @@ -1,5 +1,5 @@ #![feature(test)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] extern crate test; diff --git a/tokio-threadpool/benches/blocking.rs b/tokio-threadpool/benches/blocking.rs index 7dfad5d66..46e4e0392 100644 --- a/tokio-threadpool/benches/blocking.rs +++ b/tokio-threadpool/benches/blocking.rs @@ -1,5 +1,5 @@ #![feature(test)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] extern crate test; diff --git a/tokio-threadpool/benches/depth.rs b/tokio-threadpool/benches/depth.rs index 3d5a1c80a..be6073400 100644 --- a/tokio-threadpool/benches/depth.rs +++ b/tokio-threadpool/benches/depth.rs @@ -1,5 +1,5 @@ #![feature(test)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] extern crate test; diff --git a/tokio-threadpool/src/lib.rs b/tokio-threadpool/src/lib.rs index ad0ae7571..745e46c47 100644 --- a/tokio-threadpool/src/lib.rs +++ b/tokio-threadpool/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-threadpool/0.2.0-alpha.1")] -#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] //! A work-stealing based thread pool for executing futures. diff --git a/tokio-threadpool/tests/blocking.rs b/tokio-threadpool/tests/blocking.rs index 96e945eb3..4b10affc9 100644 --- a/tokio-threadpool/tests/blocking.rs +++ b/tokio-threadpool/tests/blocking.rs @@ -1,4 +1,4 @@ -#![deny(/* warnings, */ rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_test::*; diff --git a/tokio-threadpool/tests/hammer.rs b/tokio-threadpool/tests/hammer.rs index d8533bd8c..3bb9af84a 100644 --- a/tokio-threadpool/tests/hammer.rs +++ b/tokio-threadpool/tests/hammer.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_sync::{mpsc, oneshot}; diff --git a/tokio-threadpool/tests/threadpool.rs b/tokio-threadpool/tests/threadpool.rs index 3214acd83..5636a3b80 100644 --- a/tokio-threadpool/tests/threadpool.rs +++ b/tokio-threadpool/tests/threadpool.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_executor::park::{Park, Unpark}; diff --git a/tokio-timer/src/lib.rs b/tokio-timer/src/lib.rs index 2ed1338e8..714003982 100644 --- a/tokio-timer/src/lib.rs +++ b/tokio-timer/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-timer/0.3.0-alpha.1")] -#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] #![feature(async_await)] diff --git a/tokio-timer/tests/clock.rs b/tokio-timer/tests/clock.rs index 4351465d3..1dd9ac612 100644 --- a/tokio-timer/tests/clock.rs +++ b/tokio-timer/tests/clock.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use std::time::Instant; use tokio_timer::clock; diff --git a/tokio-timer/tests/delay.rs b/tokio-timer/tests/delay.rs index dc0f30238..bcfc07133 100644 --- a/tokio-timer/tests/delay.rs +++ b/tokio-timer/tests/delay.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_test::task::MockTask; diff --git a/tokio-timer/tests/hammer.rs b/tokio-timer/tests/hammer.rs index 3f23d3bc0..50c7714b5 100644 --- a/tokio-timer/tests/hammer.rs +++ b/tokio-timer/tests/hammer.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_current_thread::CurrentThread; diff --git a/tokio-timer/tests/interval.rs b/tokio-timer/tests/interval.rs index 1370db533..2f6f84aa7 100644 --- a/tokio-timer/tests/interval.rs +++ b/tokio-timer/tests/interval.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_test::task::MockTask; diff --git a/tokio-timer/tests/queue.rs b/tokio-timer/tests/queue.rs index bc2c12e8c..4c3032294 100644 --- a/tokio-timer/tests/queue.rs +++ b/tokio-timer/tests/queue.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio_test::task::MockTask; use tokio_test::{assert_ok, assert_pending, assert_ready, clock}; diff --git a/tokio-timer/tests/throttle.rs b/tokio-timer/tests/throttle.rs index da1762409..e8322e6d3 100644 --- a/tokio-timer/tests/throttle.rs +++ b/tokio-timer/tests/throttle.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![cfg(feature = "async-traits")] use tokio_sync::mpsc; diff --git a/tokio-timer/tests/timeout.rs b/tokio-timer/tests/timeout.rs index 74bb740e3..df4cfde80 100644 --- a/tokio-timer/tests/timeout.rs +++ b/tokio-timer/tests/timeout.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio_sync::oneshot; diff --git a/tokio-tls/examples_old/download-rust-lang.rs b/tokio-tls/examples_old/download-rust-lang.rs index 19e80e229..581b29c55 100644 --- a/tokio-tls/examples_old/download-rust-lang.rs +++ b/tokio-tls/examples_old/download-rust-lang.rs @@ -1,4 +1,4 @@ -// #![deny(warnings, rust_2018_idioms)] +// #![warn(rust_2018_idioms)] #![feature(async_await)] use native_tls::TlsConnector; diff --git a/tokio-tls/examples_old/echo.rs b/tokio-tls/examples_old/echo.rs index 7622eae04..730e3d9e8 100644 --- a/tokio-tls/examples_old/echo.rs +++ b/tokio-tls/examples_old/echo.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] // A tiny async TLS echo server with Tokio use native_tls; diff --git a/tokio-tls/src/lib.rs b/tokio-tls/src/lib.rs index 80c27f3ec..515935c7c 100644 --- a/tokio-tls/src/lib.rs +++ b/tokio-tls/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-tls/0.3.0-alpha.1")] -#![deny(rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] #![feature(async_await)] diff --git a/tokio-tls/tests/bad.rs b/tokio-tls/tests/bad.rs index fc7d04375..87d92aa18 100644 --- a/tokio-tls/tests/bad.rs +++ b/tokio-tls/tests/bad.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use cfg_if::cfg_if; diff --git a/tokio-tls/tests/google.rs b/tokio-tls/tests/google.rs index 27e7bb5e0..4f2063e81 100644 --- a/tokio-tls/tests/google.rs +++ b/tokio-tls/tests/google.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use cfg_if::cfg_if; diff --git a/tokio-tls/tests/smoke.rs b/tokio-tls/tests/smoke.rs index 024db4965..3bef5984b 100644 --- a/tokio-tls/tests/smoke.rs +++ b/tokio-tls/tests/smoke.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use cfg_if::cfg_if; diff --git a/tokio-udp/src/lib.rs b/tokio-udp/src/lib.rs index 91b03f016..b25fc71b0 100644 --- a/tokio-udp/src/lib.rs +++ b/tokio-udp/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-tcp/0.2.0-alpha.1")] -#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] #![feature(async_await)] diff --git a/tokio-udp/tests/udp.rs b/tokio-udp/tests/udp.rs index bc140daa4..12b005166 100644 --- a/tokio-udp/tests/udp.rs +++ b/tokio-udp/tests/udp.rs @@ -1,5 +1,5 @@ #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio_udp::UdpSocket; diff --git a/tokio-uds/src/lib.rs b/tokio-uds/src/lib.rs index 1b0c211a3..2f8dc7cfd 100644 --- a/tokio-uds/src/lib.rs +++ b/tokio-uds/src/lib.rs @@ -1,7 +1,6 @@ #![cfg(unix)] #![doc(html_root_url = "https://docs.rs/tokio-uds/0.3.0-alpha.1")] -#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] #![feature(async_await)] diff --git a/tokio-uds/tests/datagram.rs b/tokio-uds/tests/datagram.rs index f5d8c5bd2..c222810be 100644 --- a/tokio-uds/tests/datagram.rs +++ b/tokio-uds/tests/datagram.rs @@ -1,6 +1,6 @@ #![cfg(unix)] #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use std::io; use tempfile; diff --git a/tokio-uds/tests/stream.rs b/tokio-uds/tests/stream.rs index a05a7e960..66c15586e 100644 --- a/tokio-uds/tests/stream.rs +++ b/tokio-uds/tests/stream.rs @@ -1,6 +1,6 @@ #![cfg(unix)] #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use futures::future::try_join; use tempfile::Builder; diff --git a/tokio/benches/latency.rs b/tokio/benches/latency.rs index 1ea3574d8..0baa1c4ac 100644 --- a/tokio/benches/latency.rs +++ b/tokio/benches/latency.rs @@ -1,5 +1,5 @@ #![feature(test)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] extern crate test; diff --git a/tokio/benches/mio-ops.rs b/tokio/benches/mio-ops.rs index dffb7e9a7..5a77f1b7e 100644 --- a/tokio/benches/mio-ops.rs +++ b/tokio/benches/mio-ops.rs @@ -1,7 +1,7 @@ // Measure cost of different operations // to get a sense of performance tradeoffs #![feature(test)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] extern crate test; diff --git a/tokio/benches/tcp.rs b/tokio/benches/tcp.rs index 627d26be9..ef53b7924 100644 --- a/tokio/benches/tcp.rs +++ b/tokio/benches/tcp.rs @@ -1,5 +1,5 @@ #![feature(test)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] pub extern crate test; diff --git a/tokio/examples/chat.rs b/tokio/examples/chat.rs index 5993ef570..63542f923 100644 --- a/tokio/examples/chat.rs +++ b/tokio/examples/chat.rs @@ -25,7 +25,7 @@ //! messages. #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use futures::{Poll, SinkExt, Stream, StreamExt}; use std::{collections::HashMap, env, error::Error, io, net::SocketAddr, pin::Pin, task::Context}; diff --git a/tokio/examples/connect.rs b/tokio/examples/connect.rs index a9c7f0038..5b4bae434 100644 --- a/tokio/examples/connect.rs +++ b/tokio/examples/connect.rs @@ -14,7 +14,7 @@ //! this repository! Many of them recommend running this as a simple "hook up //! stdin/stdout to a server" to get up and running. -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use futures::{SinkExt, Stream}; diff --git a/tokio/examples/echo-udp.rs b/tokio/examples/echo-udp.rs index ffaa9efc5..51759bbaf 100644 --- a/tokio/examples/echo-udp.rs +++ b/tokio/examples/echo-udp.rs @@ -11,7 +11,7 @@ //! Each line you type in to the `nc` terminal should be echo'd back to you! #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use std::error::Error; use std::net::SocketAddr; diff --git a/tokio/examples/echo.rs b/tokio/examples/echo.rs index 40dbcdaef..b70e22f37 100644 --- a/tokio/examples/echo.rs +++ b/tokio/examples/echo.rs @@ -20,7 +20,7 @@ //! should be able to see them all make progress simultaneously. #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio; use tokio::io::{AsyncReadExt, AsyncWriteExt}; diff --git a/tokio/examples/hello_world.rs b/tokio/examples/hello_world.rs index e58e7d1d4..ae6657501 100644 --- a/tokio/examples/hello_world.rs +++ b/tokio/examples/hello_world.rs @@ -11,7 +11,7 @@ //! //! cargo run --example hello_world -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use tokio; diff --git a/tokio/examples/proxy.rs b/tokio/examples/proxy.rs index 795dda82a..b885bc3bc 100644 --- a/tokio/examples/proxy.rs +++ b/tokio/examples/proxy.rs @@ -20,7 +20,7 @@ //! This final terminal will connect to our proxy, which will in turn connect to //! the echo server, and you'll be able to see data flowing between them. -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use futures::{future::try_join, FutureExt, StreamExt}; diff --git a/tokio/examples/tinydb.rs b/tokio/examples/tinydb.rs index 2b86a543e..1fe8c2b39 100644 --- a/tokio/examples/tinydb.rs +++ b/tokio/examples/tinydb.rs @@ -40,7 +40,7 @@ //! returning the previous value, if any. #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use std::collections::HashMap; use std::env; diff --git a/tokio/examples/tinyhttp.rs b/tokio/examples/tinyhttp.rs index fbf62304f..cd92d1af0 100644 --- a/tokio/examples/tinyhttp.rs +++ b/tokio/examples/tinyhttp.rs @@ -11,7 +11,7 @@ //! respectively. By default this will run I/O on all the cores your system has //! available, and it doesn't support HTTP request bodies. -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] use bytes::BytesMut; diff --git a/tokio/examples/udp-client.rs b/tokio/examples/udp-client.rs index fb7e18f04..2d1eb7b12 100644 --- a/tokio/examples/udp-client.rs +++ b/tokio/examples/udp-client.rs @@ -27,7 +27,7 @@ //! connection the server needs to be run first, otherwise the client will block forever. #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use std::env; use std::error::Error; diff --git a/tokio/examples/udp-codec.rs b/tokio/examples/udp-codec.rs index 9c53ab953..2d206e344 100644 --- a/tokio/examples/udp-codec.rs +++ b/tokio/examples/udp-codec.rs @@ -8,7 +8,7 @@ #![feature(async_await)] #![cfg(feature = "rt-full")] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use tokio::io; use tokio::net::UdpSocket; diff --git a/tokio/examples_old/blocking.rs b/tokio/examples_old/blocking.rs index 2201e1d4f..e8f042f4c 100644 --- a/tokio/examples_old/blocking.rs +++ b/tokio/examples_old/blocking.rs @@ -10,7 +10,7 @@ //! their task. #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use std::pin::Pin; use std::thread; diff --git a/tokio/examples_old/manual-runtime.rs b/tokio/examples_old/manual-runtime.rs index 592680c1a..6e2c9921c 100644 --- a/tokio/examples_old/manual-runtime.rs +++ b/tokio/examples_old/manual-runtime.rs @@ -8,7 +8,7 @@ //! Note that the error handling is a bit left out. Also, the `run` could be modified to return the //! result of the provided future. -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use futures::{future, Future}; use std::io::Error as IoError; diff --git a/tokio/examples_old/print_each_packet.rs b/tokio/examples_old/print_each_packet.rs index f70510ee5..3dc0b3187 100644 --- a/tokio/examples_old/print_each_packet.rs +++ b/tokio/examples_old/print_each_packet.rs @@ -52,7 +52,7 @@ //! ``` //! -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use std::env; use std::net::SocketAddr; diff --git a/tokio/examples_old/udp-codec.rs b/tokio/examples_old/udp-codec.rs index fc34253a2..650c3ffcf 100644 --- a/tokio/examples_old/udp-codec.rs +++ b/tokio/examples_old/udp-codec.rs @@ -6,7 +6,7 @@ //! new message with a new destination. Overall, we then use this to construct a //! "ping pong" pair where two sockets are sending messages back and forth. -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] use env_logger; use std::net::SocketAddr; diff --git a/tokio/src/lib.rs b/tokio/src/lib.rs index feab009ce..75d52073f 100644 --- a/tokio/src/lib.rs +++ b/tokio/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio/0.2.0-alpha.1")] -#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)] -#![cfg_attr(test, deny(warnings))] +#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] #![feature(async_await)] diff --git a/tokio/tests/buffered.rs b/tokio/tests/buffered.rs index 8bc458d78..1f81418c8 100644 --- a/tokio/tests/buffered.rs +++ b/tokio/tests/buffered.rs @@ -1,5 +1,5 @@ #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![cfg(feature = "default")] use tokio::net::TcpListener; diff --git a/tokio/tests/clock.rs b/tokio/tests/clock.rs index b7367804e..621b3ecf6 100644 --- a/tokio/tests/clock.rs +++ b/tokio/tests/clock.rs @@ -1,5 +1,5 @@ #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![cfg(feature = "default")] use tokio::runtime::{self, current_thread}; diff --git a/tokio/tests/drop-core.rs b/tokio/tests/drop-core.rs index fd451b139..32fb24447 100644 --- a/tokio/tests/drop-core.rs +++ b/tokio/tests/drop-core.rs @@ -1,5 +1,5 @@ #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![cfg(feature = "default")] use tokio::net::TcpListener; diff --git a/tokio/tests/reactor.rs b/tokio/tests/reactor.rs index 03868e976..43c82c376 100644 --- a/tokio/tests/reactor.rs +++ b/tokio/tests/reactor.rs @@ -1,5 +1,5 @@ #![feature(async_await)] -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![cfg(feature = "default")] use tokio_reactor::Reactor; diff --git a/tokio/tests/runtime_current_thread.rs b/tokio/tests/runtime_current_thread.rs index 021bce974..f9eda9972 100644 --- a/tokio/tests/runtime_current_thread.rs +++ b/tokio/tests/runtime_current_thread.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] #![cfg(feature = "default")] diff --git a/tokio/tests/runtime_threaded.rs b/tokio/tests/runtime_threaded.rs index 537cc79b9..d95920711 100644 --- a/tokio/tests/runtime_threaded.rs +++ b/tokio/tests/runtime_threaded.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] #![cfg(feature = "default")] diff --git a/tokio/tests/timer.rs b/tokio/tests/timer.rs index 553a083d5..60ce0bbd5 100644 --- a/tokio/tests/timer.rs +++ b/tokio/tests/timer.rs @@ -1,4 +1,4 @@ -#![deny(warnings, rust_2018_idioms)] +#![warn(rust_2018_idioms)] #![feature(async_await)] #![cfg(feature = "default")]