From e07367fa0f006acba75b9dcfc5df15dc436d76d7 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Fri, 9 Aug 2019 16:15:31 +0900 Subject: [PATCH 1/2] chore: change default lint level to warn and deny warnings in ci --- azure-pipelines.yml | 1 + ci/azure-clippy.yml | 2 +- tokio-buf/src/lib.rs | 3 +-- tokio-codec/src/lib.rs | 3 +-- tokio-codec/tests/codecs.rs | 2 +- tokio-codec/tests/framed.rs | 2 +- tokio-codec/tests/framed_read.rs | 2 +- tokio-codec/tests/framed_write.rs | 2 +- tokio-codec/tests/length_delimited.rs | 2 +- tokio-current-thread/src/lib.rs | 3 +-- tokio-current-thread/tests/current_thread.rs | 2 +- tokio-executor/src/lib.rs | 3 +-- tokio-executor/tests/enter.rs | 2 +- tokio-executor/tests/executor.rs | 2 +- tokio-fs/examples_old/std-echo.rs | 1 - tokio-fs/src/lib.rs | 3 +-- tokio-fs/tests/dir.rs | 2 +- tokio-fs/tests/file.rs | 2 +- tokio-fs/tests/link.rs | 2 +- tokio-io/src/lib.rs | 3 +-- tokio-io/tests/copy.rs | 2 +- tokio-io/tests/lines.rs | 2 +- tokio-io/tests/read.rs | 2 +- tokio-io/tests/read_exact.rs | 2 +- tokio-io/tests/read_line.rs | 2 +- tokio-io/tests/read_to_end.rs | 2 +- tokio-io/tests/read_to_string.rs | 2 +- tokio-io/tests/read_until.rs | 2 +- tokio-io/tests/write.rs | 2 +- tokio-io/tests/write_all.rs | 2 +- tokio-macros/src/lib.rs | 3 +-- tokio-process/src/lib.rs | 3 +-- tokio-process/tests/issue_42.rs | 2 +- tokio-process/tests/smoke.rs | 2 +- tokio-process/tests/stdio.rs | 2 +- tokio-process/tests/support/mod.rs | 2 +- tokio-reactor/benches/basic.rs | 2 +- tokio-reactor/src/lib.rs | 3 +-- tokio-signal/examples/ctrl-c.rs | 2 +- tokio-signal/examples/multiple.rs | 2 +- tokio-signal/examples/sighup-example.rs | 2 +- tokio-signal/src/lib.rs | 3 +-- tokio-signal/tests/drop_multi_loop.rs | 2 +- tokio-signal/tests/drop_then_get_a_signal.rs | 2 +- .../tests/dropping_does_not_deregister_other_instances.rs | 2 +- tokio-signal/tests/multi_loop.rs | 2 +- tokio-signal/tests/notify_both.rs | 2 +- tokio-signal/tests/simple.rs | 2 +- tokio-signal/tests/support.rs | 2 +- tokio-signal/tests/twice.rs | 2 +- tokio-sync/benches/mpsc.rs | 2 +- tokio-sync/benches/oneshot.rs | 2 +- tokio-sync/src/lib.rs | 3 +-- tokio-sync/tests/atomic_waker.rs | 2 +- tokio-sync/tests/errors.rs | 2 +- tokio-sync/tests/fuzz_atomic_waker.rs | 2 +- tokio-sync/tests/fuzz_list.rs | 2 +- tokio-sync/tests/fuzz_mpsc.rs | 2 +- tokio-sync/tests/fuzz_oneshot.rs | 2 +- tokio-sync/tests/fuzz_semaphore.rs | 2 +- tokio-sync/tests/lock.rs | 2 +- tokio-sync/tests/mpsc.rs | 2 +- tokio-sync/tests/oneshot.rs | 2 +- tokio-sync/tests/semaphore.rs | 2 +- tokio-sync/tests/watch.rs | 2 +- tokio-tcp/src/lib.rs | 3 +-- tokio-tcp/tests/echo.rs | 2 +- tokio-tcp/tests/tcp.rs | 2 +- tokio-tcp/tests/tcp_accept.rs | 2 +- tokio-tcp/tests/tcp_peek.rs | 2 +- tokio-test/src/lib.rs | 3 +-- tokio-test/tests/clock.rs | 2 +- tokio-test/tests/io.rs | 2 +- tokio-test/tests/macros.rs | 2 +- tokio-threadpool/benches/basic.rs | 2 +- tokio-threadpool/benches/blocking.rs | 2 +- tokio-threadpool/benches/depth.rs | 2 +- tokio-threadpool/src/lib.rs | 3 +-- tokio-threadpool/tests/blocking.rs | 2 +- tokio-threadpool/tests/hammer.rs | 2 +- tokio-threadpool/tests/threadpool.rs | 2 +- tokio-timer/src/lib.rs | 3 +-- tokio-timer/tests/clock.rs | 2 +- tokio-timer/tests/delay.rs | 2 +- tokio-timer/tests/hammer.rs | 2 +- tokio-timer/tests/interval.rs | 2 +- tokio-timer/tests/queue.rs | 2 +- tokio-timer/tests/throttle.rs | 2 +- tokio-timer/tests/timeout.rs | 2 +- tokio-tls/examples_old/download-rust-lang.rs | 2 +- tokio-tls/examples_old/echo.rs | 2 +- tokio-tls/src/lib.rs | 3 +-- tokio-tls/tests/bad.rs | 2 +- tokio-tls/tests/google.rs | 2 +- tokio-tls/tests/smoke.rs | 2 +- tokio-udp/src/lib.rs | 3 +-- tokio-udp/tests/udp.rs | 2 +- tokio-uds/src/lib.rs | 3 +-- tokio-uds/tests/datagram.rs | 2 +- tokio-uds/tests/stream.rs | 2 +- tokio/benches/latency.rs | 2 +- tokio/benches/mio-ops.rs | 2 +- tokio/benches/tcp.rs | 2 +- tokio/examples/chat.rs | 2 +- tokio/examples/connect.rs | 2 +- tokio/examples/echo-udp.rs | 2 +- tokio/examples/echo.rs | 2 +- tokio/examples/hello_world.rs | 2 +- tokio/examples/proxy.rs | 2 +- tokio/examples/tinydb.rs | 2 +- tokio/examples/tinyhttp.rs | 2 +- tokio/examples/udp-client.rs | 2 +- tokio/examples/udp-codec.rs | 2 +- tokio/examples_old/blocking.rs | 2 +- tokio/examples_old/manual-runtime.rs | 2 +- tokio/examples_old/print_each_packet.rs | 2 +- tokio/examples_old/udp-codec.rs | 2 +- tokio/src/lib.rs | 3 +-- tokio/tests/buffered.rs | 2 +- tokio/tests/clock.rs | 2 +- tokio/tests/drop-core.rs | 2 +- tokio/tests/reactor.rs | 2 +- tokio/tests/runtime_current_thread.rs | 2 +- tokio/tests/runtime_threaded.rs | 2 +- tokio/tests/timer.rs | 2 +- 125 files changed, 124 insertions(+), 143 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 22cd40e1380..6e945985703 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 11a1cf75138..c43615560b6 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 ce65f2b12ec..1d63c2034d8 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 c1a149bbe2f..8e1802b8b0e 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 6a5117158ca..f4b79dbd438 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 624f8ffb95a..fd9308907b8 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 e4ef53c2841..4215c04cb5a 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 c1595154096..9d85c4d835e 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 8c1eaed23dd..404786e31c2 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 004e746e424..483b1fd0765 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 49a40706805..a2ec5ce6d7a 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 8ae4e1ffb70..aceb6efe386 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 c0586d6664d..25ef600694f 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 930f91162eb..608db157885 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 0b55c129772..774cec14a4c 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 669f2463fe9..46387e1c88b 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 3e7a7c15617..48242d5ae19 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 480053d4f38..1a2c89f1426 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 200221eccaa..4350eac6ac3 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 968f224efa1..67918b0b379 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 8173084f8e9..73bef39340a 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 940989731be..23bb8a46296 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 b928bc78450..f4607f062a1 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 2a23073baff..e3d5ee11e94 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 13d0e5c4004..b24448b189e 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 e46c4935cd2..1a79e099f39 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 2a75a5c13bc..69ee826d327 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 9f7522c65c7..3716851b4d3 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 f4a58290337..e572100c48b 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 5490275222e..ca9a478b68e 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 b7279b1ee5d..ed0462a2c3e 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 b52cf947cca..31018ffecc8 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 77deae7e98d..48e73427890 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 d4d2189e186..e9ac5f078ab 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 f26cbd8a720..6eb5205a4bf 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 0d38a6805e7..030fb58a2c1 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 23424229f5f..110a0d86fa4 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 ca15d2b576d..d583b1d049b 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 740b6c01465..48aede0539b 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 996af50d6c7..c1ba96c26ca 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 5762d68780a..6ee46a9d087 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 56f0d1abbbb..f7715a77b37 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 1ba338cf81e..fa04bc07706 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 6f5a628c93a..0573d6b9d4a 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 ca8bb1b0c0d..2b80d114327 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 1d75e873f6f..2fbf4415552 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 6b82df7aa9d..9927bf054e9 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 1456cb61d79..9eafe5961b4 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 a7d4204b851..ee6387a518e 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 a51478bc541..edef0d0c1af 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 4751b3c0b55..5e05f6687d0 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 c2f0ef4bbea..d2f7b3795a1 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 a84a478914b..be71a3e4344 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/tests/atomic_waker.rs b/tokio-sync/tests/atomic_waker.rs index ffd3cc26abc..5d38633092d 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 2afafc1f6d8..38ac1bf6849 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 b53f90dac47..de274d32c76 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 e0a55473dfa..fa1e9f5e1f5 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 d59f3fedf26..d339781030f 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 315164781b8..ae990a0c96d 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 5858fd20410..018fa0a98f5 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 af318a156a9..65ecf142fce 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 e18464a8060..8f1ff307bd8 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 615373dd39c..77e02d8cf4d 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 a19f261a402..c1280f36cae 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 3be30938647..573a3af0bc5 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 b89cfc2fb71..1e8ca2f50af 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 cb7e8b02e5d..0a0c87cae33 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 e95768d84e2..3d2316d930b 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 3a7d9f652d7..a31096c87dd 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 829254ef48d..60f0c76d34f 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 a24277aaa16..4d8539bd42f 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 082ce311ab8..915f6899e30 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 00044e83fbf..93c9dc298b9 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 ea3e5b5c4f5..a33fbad8ac7 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 c49f6a8e47b..9073e079700 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 7dfad5d666e..46e4e0392ac 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 3d5a1c80aa9..be6073400c4 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 ad0ae75710d..745e46c47f4 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 96e945eb3b1..4b10affc96b 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 d8533bd8c6b..3bb9af84a9f 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 3214acd838a..5636a3b80d6 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 2ed1338e8bd..71400398256 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 4351465d32d..1dd9ac612fd 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 dc0f30238a2..bcfc0713339 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 3f23d3bc0c4..50c7714b51b 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 1370db533c3..2f6f84aa78d 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 bc2c12e8c67..4c303229493 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 da1762409f5..e8322e6d37c 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 74bb740e33f..df4cfde80cc 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 19e80e22924..581b29c5561 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 7622eae0461..730e3d9e839 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 80c27f3ecdd..515935c7c9e 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 fc7d043752a..87d92aa18bb 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 27e7bb5e02c..4f2063e81fb 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 024db4965a7..3bef5984ba5 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 91b03f016d6..b25fc71b0ed 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 bc140daa4f2..12b005166de 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 1b0c211a3f3..2f8dc7cfd4c 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 f5d8c5bd260..c222810befe 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 a05a7e960ba..66c15586ea5 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 1ea3574d80d..0baa1c4ac7e 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 dffb7e9a73d..5a77f1b7e9e 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 627d26be9f6..ef53b7924bb 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 5993ef570d1..63542f923e7 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 a9c7f0038fe..5b4bae434e4 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 ffaa9efc5ed..51759bbaf8d 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 40dbcdaefe6..b70e22f3748 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 e58e7d1d477..ae66575017d 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 795dda82a80..b885bc3bc05 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 2b86a543e24..1fe8c2b39dd 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 fbf62304f1a..cd92d1af0a7 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 fb7e18f0455..2d1eb7b1220 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 9c53ab9537c..2d206e3447c 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 2201e1d4f7e..e8f042f4c33 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 592680c1a58..6e2c9921cc2 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 f70510ee5c5..3dc0b318722 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 fc34253a28a..650c3ffcfb5 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 feab009ced8..75d52073f70 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 8bc458d78c4..1f81418c891 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 b7367804eea..621b3ecf67b 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 fd451b13998..32fb2444763 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 03868e97639..43c82c37635 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 021bce97438..f9eda9972f3 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 537cc79b935..d959207119e 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 553a083d507..60ce0bbd55c 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")] From 37214ca67d939f7305ca53dbfbaaf53e276b3702 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Fri, 9 Aug 2019 17:00:00 +0900 Subject: [PATCH 2/2] sync: fix unused imports --- tokio-sync/src/watch.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tokio-sync/src/watch.rs b/tokio-sync/src/watch.rs index 0c2bb243aa8..4fec6947336 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;