From ce5d69480a644011acedd3072eaef61cd72e5850 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 2 Apr 2019 22:09:56 +0000 Subject: Add must_use annotations to Result::is_ok and is_err --- src/libstd/sync/mpsc/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index bc32b8e47b3..685c7909ff2 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -1005,7 +1005,7 @@ impl SyncSender { /// thread::spawn(move || { /// // This will return an error and send /// // no message if the buffer is full - /// sync_sender2.try_send(3).is_err(); + /// let _ = sync_sender2.try_send(3); /// }); /// /// let mut msg; -- cgit 1.4.1-3-g733a5 From 8ef7ca130271369400719c712369c33a30d6528b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 14 Apr 2019 10:16:23 +0200 Subject: make lint levels more consistent --- src/liballoc/lib.rs | 6 +++--- src/libstd/lib.rs | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/libstd') diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 41e22d84699..d8d61c673af 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -58,13 +58,13 @@ #![no_std] #![needs_allocator] -#![deny(rust_2018_idioms)] -#![allow(explicit_outlives_requirements)] - #![warn(deprecated_in_future)] #![warn(missing_debug_implementations)] #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings +#![deny(rust_2018_idioms)] +#![allow(explicit_outlives_requirements)] + #![cfg_attr(not(test), feature(generator_trait))] #![cfg_attr(test, feature(test))] diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index ee6ba3f438f..62bc1991cc9 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -205,9 +205,10 @@ // Don't link to std. We are std. #![no_std] -#![deny(missing_docs)] -#![deny(intra_doc_link_resolution_failure)] -#![deny(missing_debug_implementations)] +//#![warn(deprecated_in_future)] // FIXME: std still has quite a few uses of `mem::uninitialized` +#![warn(missing_docs)] +#![warn(missing_debug_implementations)] +#![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings #![deny(rust_2018_idioms)] #![allow(explicit_outlives_requirements)] -- cgit 1.4.1-3-g733a5