From 39f369f686fa7b2b5b591cb2be7e00d421824d88 Mon Sep 17 00:00:00 2001 From: David Kellum Date: Mon, 30 Sep 2019 15:28:26 -0700 Subject: [PATCH] v0.1.x: Don't deny warnings (#1368) This is just too aggressive for a stable maintenance branch of tokio, in that new rust release warnings are prooving too hard to fix. --- benches/latency.rs | 1 - benches/mio-ops.rs | 1 - benches/tcp.rs | 1 - tokio-buf/src/lib.rs | 1 - tokio-codec/src/lib.rs | 2 +- tokio-current-thread/src/lib.rs | 2 +- tokio-executor/src/lib.rs | 2 +- tokio-fs/examples/std-echo.rs | 2 +- tokio-fs/src/lib.rs | 2 +- tokio-futures/src/lib.rs | 1 - tokio-io/src/_tokio_codec/mod.rs | 2 +- tokio-io/src/lib.rs | 2 +- tokio-reactor/benches/basic.rs | 1 - tokio-reactor/src/lib.rs | 2 +- tokio-sync/benches/mpsc.rs | 1 - tokio-sync/benches/oneshot.rs | 1 - tokio-sync/src/lib.rs | 1 - tokio-sync/tests/atomic_task.rs | 2 -- tokio-sync/tests/errors.rs | 2 -- tokio-sync/tests/fuzz_list.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-tcp/src/lib.rs | 2 +- tokio-test/src/lib.rs | 1 - tokio-threadpool/benches/basic.rs | 1 - tokio-threadpool/benches/blocking.rs | 1 - tokio-threadpool/benches/depth.rs | 1 - tokio-threadpool/src/lib.rs | 2 +- tokio-timer/src/lib.rs | 2 +- tokio-udp/src/lib.rs | 2 +- tokio-uds/src/lib.rs | 2 +- tokio/examples/chat-combinator-current-thread.rs | 2 -- tokio/examples/chat-combinator.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/print_each_packet.rs | 2 -- tokio/examples/proxy.rs | 2 -- tokio/examples/tinydb.rs | 2 -- tokio/examples/tinyhttp.rs | 2 -- tokio/examples/udp-codec.rs | 2 -- tokio/src/lib.rs | 2 +- 48 files changed, 14 insertions(+), 69 deletions(-) diff --git a/benches/latency.rs b/benches/latency.rs index d9ace03a4..a5dfc47c3 100644 --- a/benches/latency.rs +++ b/benches/latency.rs @@ -1,5 +1,4 @@ #![feature(test)] -#![deny(warnings)] extern crate test; #[macro_use] diff --git a/benches/mio-ops.rs b/benches/mio-ops.rs index be4db7f79..4e4fb6719 100644 --- a/benches/mio-ops.rs +++ b/benches/mio-ops.rs @@ -1,7 +1,6 @@ // Measure cost of different operations // to get a sense of performance tradeoffs #![feature(test)] -#![deny(warnings)] extern crate mio; extern crate test; diff --git a/benches/tcp.rs b/benches/tcp.rs index 1872790d9..d8d5ebce7 100644 --- a/benches/tcp.rs +++ b/benches/tcp.rs @@ -1,5 +1,4 @@ #![feature(test)] -#![deny(warnings)] extern crate futures; extern crate tokio; diff --git a/tokio-buf/src/lib.rs b/tokio-buf/src/lib.rs index c07e40258..8bbc4c876 100644 --- a/tokio-buf/src/lib.rs +++ b/tokio-buf/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-buf/0.1.1")] #![deny(missing_docs, missing_debug_implementations, unreachable_pub)] -#![cfg_attr(test, deny(warnings))] //! Asynchronous stream of bytes. //! diff --git a/tokio-codec/src/lib.rs b/tokio-codec/src/lib.rs index a5ed45d06..314f525a3 100644 --- a/tokio-codec/src/lib.rs +++ b/tokio-codec/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(missing_docs, missing_debug_implementations, warnings)] +#![deny(missing_docs, missing_debug_implementations)] #![doc(html_root_url = "https://docs.rs/tokio-codec/0.1.1")] //! Utilities for encoding and decoding frames. diff --git a/tokio-current-thread/src/lib.rs b/tokio-current-thread/src/lib.rs index 33f7fa26a..cea824c0d 100644 --- a/tokio-current-thread/src/lib.rs +++ b/tokio-current-thread/src/lib.rs @@ -1,5 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-current-thread/0.1.6")] -#![deny(warnings, missing_docs, missing_debug_implementations)] +#![deny(missing_docs, missing_debug_implementations)] //! A single-threaded executor which executes tasks on the same thread from which //! they are spawned. diff --git a/tokio-executor/src/lib.rs b/tokio-executor/src/lib.rs index 41f502cf5..8bbf92b2e 100644 --- a/tokio-executor/src/lib.rs +++ b/tokio-executor/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(missing_docs, missing_debug_implementations, warnings)] +#![deny(missing_docs, missing_debug_implementations)] #![doc(html_root_url = "https://docs.rs/tokio-executor/0.1.8")] //! Task execution related traits and utilities. diff --git a/tokio-fs/examples/std-echo.rs b/tokio-fs/examples/std-echo.rs index d11e98f9f..564d19a1c 100644 --- a/tokio-fs/examples/std-echo.rs +++ b/tokio-fs/examples/std-echo.rs @@ -1,5 +1,5 @@ //! Echo everything received on STDIN to STDOUT. -#![deny(deprecated, warnings)] +#![deny(deprecated)] extern crate futures; extern crate tokio_codec; diff --git a/tokio-fs/src/lib.rs b/tokio-fs/src/lib.rs index ba6a95850..6033f719f 100644 --- a/tokio-fs/src/lib.rs +++ b/tokio-fs/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(missing_docs, missing_debug_implementations, warnings)] +#![deny(missing_docs, missing_debug_implementations)] #![doc(html_root_url = "https://docs.rs/tokio-fs/0.1.6")] //! Asynchronous file and standard stream adaptation. diff --git a/tokio-futures/src/lib.rs b/tokio-futures/src/lib.rs index 411dc424e..c50e3b9a1 100644 --- a/tokio-futures/src/lib.rs +++ b/tokio-futures/src/lib.rs @@ -2,7 +2,6 @@ #![feature(await_macro)] #![doc(html_root_url = "https://docs.rs/tokio-futures/0.1.0")] #![deny(missing_docs, missing_debug_implementations)] -#![cfg_attr(test, deny(warnings))] //! A preview of Tokio w/ `async` / `await` support. diff --git a/tokio-io/src/_tokio_codec/mod.rs b/tokio-io/src/_tokio_codec/mod.rs index 1c703f3a4..5d7eb2189 100644 --- a/tokio-io/src/_tokio_codec/mod.rs +++ b/tokio-io/src/_tokio_codec/mod.rs @@ -10,7 +10,7 @@ //! [`Stream`]: # //! [transports]: # -#![deny(missing_docs, missing_debug_implementations, warnings)] +#![deny(missing_docs, missing_debug_implementations)] #![doc(hidden, html_root_url = "https://docs.rs/tokio-codec/0.1.0")] // _tokio_codec are the items that belong in the `tokio_codec` crate. However, because we need to diff --git a/tokio-io/src/lib.rs b/tokio-io/src/lib.rs index 790c0b589..131286fa2 100644 --- a/tokio-io/src/lib.rs +++ b/tokio-io/src/lib.rs @@ -1,4 +1,4 @@ -#![deny(missing_docs, missing_debug_implementations, warnings)] +#![deny(missing_docs, missing_debug_implementations)] #![doc(html_root_url = "https://docs.rs/tokio-io/0.1.12")] //! Core I/O traits and combinators when working with Tokio. diff --git a/tokio-reactor/benches/basic.rs b/tokio-reactor/benches/basic.rs index 63020d2f7..40b5939be 100644 --- a/tokio-reactor/benches/basic.rs +++ b/tokio-reactor/benches/basic.rs @@ -1,5 +1,4 @@ #![feature(test)] -#![deny(warnings)] extern crate futures; extern crate mio; diff --git a/tokio-reactor/src/lib.rs b/tokio-reactor/src/lib.rs index 2334d32be..727ae536c 100644 --- a/tokio-reactor/src/lib.rs +++ b/tokio-reactor/src/lib.rs @@ -1,5 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-reactor/0.1.10")] -#![deny(missing_docs, warnings, missing_debug_implementations)] +#![deny(missing_docs, missing_debug_implementations)] //! Event loop that drives Tokio I/O resources. //! diff --git a/tokio-sync/benches/mpsc.rs b/tokio-sync/benches/mpsc.rs index 6bb0aac18..5b1fa97b7 100644 --- a/tokio-sync/benches/mpsc.rs +++ b/tokio-sync/benches/mpsc.rs @@ -1,5 +1,4 @@ #![feature(test)] -#![cfg_attr(test, deny(warnings))] extern crate futures; extern crate test; diff --git a/tokio-sync/benches/oneshot.rs b/tokio-sync/benches/oneshot.rs index b3170ce42..15ed17195 100644 --- a/tokio-sync/benches/oneshot.rs +++ b/tokio-sync/benches/oneshot.rs @@ -1,5 +1,4 @@ #![feature(test)] -#![cfg_attr(test, deny(warnings))] extern crate futures; extern crate test; diff --git a/tokio-sync/src/lib.rs b/tokio-sync/src/lib.rs index cd7914625..834422725 100644 --- a/tokio-sync/src/lib.rs +++ b/tokio-sync/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-sync/0.1.6")] #![deny(missing_debug_implementations, missing_docs, unreachable_pub)] -#![cfg_attr(test, deny(warnings))] //! Asynchronous synchronization primitives. //! diff --git a/tokio-sync/tests/atomic_task.rs b/tokio-sync/tests/atomic_task.rs index cfe91e1af..d630e3ea9 100644 --- a/tokio-sync/tests/atomic_task.rs +++ b/tokio-sync/tests/atomic_task.rs @@ -1,5 +1,3 @@ -#![deny(warnings)] - extern crate futures; extern crate tokio_mock_task; extern crate tokio_sync; diff --git a/tokio-sync/tests/errors.rs b/tokio-sync/tests/errors.rs index 129cbfc2c..1c9e5f5e5 100644 --- a/tokio-sync/tests/errors.rs +++ b/tokio-sync/tests/errors.rs @@ -1,5 +1,3 @@ -#![deny(warnings)] - extern crate tokio_sync; fn is_error() {} diff --git a/tokio-sync/tests/fuzz_list.rs b/tokio-sync/tests/fuzz_list.rs index 43799020e..d0207ccb6 100644 --- a/tokio-sync/tests/fuzz_list.rs +++ b/tokio-sync/tests/fuzz_list.rs @@ -1,5 +1,3 @@ -#![deny(warnings)] - extern crate futures; #[macro_use] extern crate loom; diff --git a/tokio-sync/tests/fuzz_oneshot.rs b/tokio-sync/tests/fuzz_oneshot.rs index bf9d2836f..16ae117c2 100644 --- a/tokio-sync/tests/fuzz_oneshot.rs +++ b/tokio-sync/tests/fuzz_oneshot.rs @@ -1,5 +1,3 @@ -#![deny(warnings)] - extern crate futures; extern crate loom; diff --git a/tokio-sync/tests/fuzz_semaphore.rs b/tokio-sync/tests/fuzz_semaphore.rs index e88775af1..4721f75eb 100644 --- a/tokio-sync/tests/fuzz_semaphore.rs +++ b/tokio-sync/tests/fuzz_semaphore.rs @@ -1,5 +1,3 @@ -#![deny(warnings)] - #[macro_use] extern crate futures; #[macro_use] diff --git a/tokio-sync/tests/lock.rs b/tokio-sync/tests/lock.rs index 3366d2be5..e46bfa46c 100644 --- a/tokio-sync/tests/lock.rs +++ b/tokio-sync/tests/lock.rs @@ -1,5 +1,3 @@ -#![deny(warnings)] - extern crate futures; extern crate tokio_mock_task; extern crate tokio_sync; diff --git a/tokio-sync/tests/mpsc.rs b/tokio-sync/tests/mpsc.rs index 3572b94b9..e4891e94a 100644 --- a/tokio-sync/tests/mpsc.rs +++ b/tokio-sync/tests/mpsc.rs @@ -1,5 +1,3 @@ -#![deny(warnings)] - extern crate futures; extern crate tokio_mock_task; extern crate tokio_sync; diff --git a/tokio-sync/tests/oneshot.rs b/tokio-sync/tests/oneshot.rs index 46c67a74c..50b4f4b29 100644 --- a/tokio-sync/tests/oneshot.rs +++ b/tokio-sync/tests/oneshot.rs @@ -1,5 +1,3 @@ -#![deny(warnings)] - extern crate futures; extern crate tokio_mock_task; extern crate tokio_sync; diff --git a/tokio-sync/tests/semaphore.rs b/tokio-sync/tests/semaphore.rs index 8cd3533fa..0e8bd4b7f 100644 --- a/tokio-sync/tests/semaphore.rs +++ b/tokio-sync/tests/semaphore.rs @@ -1,5 +1,3 @@ -#![deny(warnings)] - extern crate futures; extern crate tokio_mock_task; extern crate tokio_sync; diff --git a/tokio-tcp/src/lib.rs b/tokio-tcp/src/lib.rs index c8aa4102f..5a060ef69 100644 --- a/tokio-tcp/src/lib.rs +++ b/tokio-tcp/src/lib.rs @@ -1,5 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-tcp/0.1.3")] -#![deny(missing_docs, warnings, missing_debug_implementations)] +#![deny(missing_docs, missing_debug_implementations)] //! TCP bindings for `tokio`. //! diff --git a/tokio-test/src/lib.rs b/tokio-test/src/lib.rs index 1256e3c2a..ede92c12a 100644 --- a/tokio-test/src/lib.rs +++ b/tokio-test/src/lib.rs @@ -1,6 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-test/0.1.0")] #![deny(missing_docs, missing_debug_implementations, unreachable_pub)] -#![cfg_attr(test, deny(warnings))] //! Tokio and Futures based testing utilites //! diff --git a/tokio-threadpool/benches/basic.rs b/tokio-threadpool/benches/basic.rs index 70dee74f5..cd1f5673c 100644 --- a/tokio-threadpool/benches/basic.rs +++ b/tokio-threadpool/benches/basic.rs @@ -1,5 +1,4 @@ #![feature(test)] -#![deny(warnings)] extern crate futures; extern crate futures_cpupool; diff --git a/tokio-threadpool/benches/blocking.rs b/tokio-threadpool/benches/blocking.rs index 8ea900eaa..bc5121545 100644 --- a/tokio-threadpool/benches/blocking.rs +++ b/tokio-threadpool/benches/blocking.rs @@ -1,5 +1,4 @@ #![feature(test)] -#![deny(warnings)] extern crate futures; extern crate rand; diff --git a/tokio-threadpool/benches/depth.rs b/tokio-threadpool/benches/depth.rs index 2d89ac90d..b4f2bcb09 100644 --- a/tokio-threadpool/benches/depth.rs +++ b/tokio-threadpool/benches/depth.rs @@ -1,5 +1,4 @@ #![feature(test)] -#![deny(warnings)] extern crate futures; extern crate futures_cpupool; diff --git a/tokio-threadpool/src/lib.rs b/tokio-threadpool/src/lib.rs index 97cfb9060..7ef741124 100644 --- a/tokio-threadpool/src/lib.rs +++ b/tokio-threadpool/src/lib.rs @@ -1,5 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-threadpool/0.1.16")] -#![deny(warnings, missing_docs, missing_debug_implementations)] +#![deny(missing_docs, missing_debug_implementations)] //! A work-stealing based thread pool for executing futures. //! diff --git a/tokio-timer/src/lib.rs b/tokio-timer/src/lib.rs index 711ce6287..49aca370f 100644 --- a/tokio-timer/src/lib.rs +++ b/tokio-timer/src/lib.rs @@ -1,5 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-timer/0.2.11")] -#![deny(missing_docs, warnings, missing_debug_implementations)] +#![deny(missing_docs, missing_debug_implementations)] //! Utilities for tracking time. //! diff --git a/tokio-udp/src/lib.rs b/tokio-udp/src/lib.rs index e56bf9566..f262a7c8c 100644 --- a/tokio-udp/src/lib.rs +++ b/tokio-udp/src/lib.rs @@ -1,5 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio-tcp/0.1.5")] -#![deny(missing_docs, warnings, missing_debug_implementations)] +#![deny(missing_docs, missing_debug_implementations)] //! UDP bindings for `tokio`. //! diff --git a/tokio-uds/src/lib.rs b/tokio-uds/src/lib.rs index feacf2f97..936de807f 100644 --- a/tokio-uds/src/lib.rs +++ b/tokio-uds/src/lib.rs @@ -1,6 +1,6 @@ #![cfg(unix)] #![doc(html_root_url = "https://docs.rs/tokio-uds/0.2.5")] -#![deny(missing_docs, warnings, missing_debug_implementations)] +#![deny(missing_docs, missing_debug_implementations)] //! Unix Domain Sockets for Tokio. //! diff --git a/tokio/examples/chat-combinator-current-thread.rs b/tokio/examples/chat-combinator-current-thread.rs index 4ef5c205f..57def5672 100644 --- a/tokio/examples/chat-combinator-current-thread.rs +++ b/tokio/examples/chat-combinator-current-thread.rs @@ -24,8 +24,6 @@ //! connected clients they'll all join the same room and see everyone else's //! messages. -#![deny(warnings)] - extern crate futures; extern crate tokio; diff --git a/tokio/examples/chat-combinator.rs b/tokio/examples/chat-combinator.rs index 354d999fb..99c09d1c6 100644 --- a/tokio/examples/chat-combinator.rs +++ b/tokio/examples/chat-combinator.rs @@ -19,8 +19,6 @@ //! connected clients they'll all join the same room and see everyone else's //! messages. -#![deny(warnings)] - extern crate futures; extern crate tokio; diff --git a/tokio/examples/chat.rs b/tokio/examples/chat.rs index c2d56ff02..612465cc4 100644 --- a/tokio/examples/chat.rs +++ b/tokio/examples/chat.rs @@ -24,8 +24,6 @@ //! connected clients they'll all join the same room and see everyone else's //! messages. -#![deny(warnings)] - extern crate tokio; #[macro_use] extern crate futures; diff --git a/tokio/examples/connect.rs b/tokio/examples/connect.rs index a0b769a4d..93240cdba 100644 --- a/tokio/examples/connect.rs +++ b/tokio/examples/connect.rs @@ -14,8 +14,6 @@ //! 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)] - extern crate bytes; extern crate futures; extern crate tokio; diff --git a/tokio/examples/echo-udp.rs b/tokio/examples/echo-udp.rs index 1d3836d2b..e833ece36 100644 --- a/tokio/examples/echo-udp.rs +++ b/tokio/examples/echo-udp.rs @@ -10,8 +10,6 @@ //! //! Each line you type in to the `nc` terminal should be echo'd back to you! -#![deny(warnings)] - #[macro_use] extern crate futures; extern crate tokio; diff --git a/tokio/examples/echo.rs b/tokio/examples/echo.rs index 96b454fb8..3966b9dad 100644 --- a/tokio/examples/echo.rs +++ b/tokio/examples/echo.rs @@ -19,8 +19,6 @@ //! you! If you open up multiple terminals running the `connect` example you //! should be able to see them all make progress simultaneously. -#![deny(warnings)] - extern crate tokio; use tokio::io; diff --git a/tokio/examples/hello_world.rs b/tokio/examples/hello_world.rs index 4febb38aa..089e28bce 100644 --- a/tokio/examples/hello_world.rs +++ b/tokio/examples/hello_world.rs @@ -11,8 +11,6 @@ //! //! cargo run --example hello_world -#![deny(warnings)] - extern crate tokio; use tokio::io; diff --git a/tokio/examples/print_each_packet.rs b/tokio/examples/print_each_packet.rs index 57d312c0a..c6857d6bd 100644 --- a/tokio/examples/print_each_packet.rs +++ b/tokio/examples/print_each_packet.rs @@ -52,8 +52,6 @@ //! ``` //! -#![deny(warnings)] - extern crate tokio; extern crate tokio_codec; diff --git a/tokio/examples/proxy.rs b/tokio/examples/proxy.rs index 950a8f594..deea3a2bc 100644 --- a/tokio/examples/proxy.rs +++ b/tokio/examples/proxy.rs @@ -20,8 +20,6 @@ //! 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)] - extern crate tokio; use std::env; diff --git a/tokio/examples/tinydb.rs b/tokio/examples/tinydb.rs index d4dc4db12..5af663b88 100644 --- a/tokio/examples/tinydb.rs +++ b/tokio/examples/tinydb.rs @@ -39,8 +39,6 @@ //! * `SET $key $value` - this will set the value of `$key` to `$value`, //! returning the previous value, if any. -#![deny(warnings)] - extern crate tokio; use std::collections::HashMap; diff --git a/tokio/examples/tinyhttp.rs b/tokio/examples/tinyhttp.rs index 90ac58695..80629f677 100644 --- a/tokio/examples/tinyhttp.rs +++ b/tokio/examples/tinyhttp.rs @@ -11,8 +11,6 @@ //! 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)] - extern crate bytes; extern crate http; extern crate httparse; diff --git a/tokio/examples/udp-codec.rs b/tokio/examples/udp-codec.rs index 9a48312c7..b8dd1b4ec 100644 --- a/tokio/examples/udp-codec.rs +++ b/tokio/examples/udp-codec.rs @@ -6,8 +6,6 @@ //! 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)] - extern crate env_logger; extern crate tokio; extern crate tokio_codec; diff --git a/tokio/src/lib.rs b/tokio/src/lib.rs index d4764516f..4434d6243 100644 --- a/tokio/src/lib.rs +++ b/tokio/src/lib.rs @@ -1,5 +1,5 @@ #![doc(html_root_url = "https://docs.rs/tokio/0.1.22")] -#![deny(missing_docs, warnings, missing_debug_implementations)] +#![deny(missing_docs, missing_debug_implementations)] //! A runtime for writing reliable, asynchronous, and slim applications. //!