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/libcore/option.rs | 2 ++ src/libcore/result.rs | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/libcore') diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 3da92c0a05a..68ef087d84b 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -178,6 +178,7 @@ impl Option { /// ``` /// /// [`Some`]: #variant.Some + #[must_use] #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn is_some(&self) -> bool { @@ -200,6 +201,7 @@ impl Option { /// ``` /// /// [`None`]: #variant.None + #[must_use] #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn is_none(&self) -> bool { diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 9b7b8368986..e22a9ebbca4 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -277,6 +277,7 @@ impl Result { /// let x: Result = Err("Some error message"); /// assert_eq!(x.is_ok(), false); /// ``` + #[must_use] #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn is_ok(&self) -> bool { @@ -301,6 +302,7 @@ impl Result { /// let x: Result = Err("Some error message"); /// assert_eq!(x.is_err(), true); /// ``` + #[must_use] #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn is_err(&self) -> bool { -- cgit 1.4.1-3-g733a5 From cdf1d368e2376a94fc433fedc63171ed9e050289 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 14 Apr 2019 10:00:09 +0200 Subject: bump stdsimd; make intra_doc_link_resolution_failure an error again --- src/liballoc/lib.rs | 2 +- src/libcore/lib.rs | 2 +- src/stdsimd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libcore') diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 7f3acc933d4..41e22d84699 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -62,8 +62,8 @@ #![allow(explicit_outlives_requirements)] #![warn(deprecated_in_future)] -#![warn(intra_doc_link_resolution_failure)] #![warn(missing_debug_implementations)] +#![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings #![cfg_attr(not(test), feature(generator_trait))] #![cfg_attr(test, feature(test))] diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 63688e70c45..615549f47bb 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -60,8 +60,8 @@ #![warn(deprecated_in_future)] #![warn(missing_docs)] -#![warn(intra_doc_link_resolution_failure)] #![warn(missing_debug_implementations)] +#![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings #![feature(allow_internal_unstable)] #![feature(arbitrary_self_types)] diff --git a/src/stdsimd b/src/stdsimd index 2792b45c975..2323a858f06 160000 --- a/src/stdsimd +++ b/src/stdsimd @@ -1 +1 @@ -Subproject commit 2792b45c975880038240d477adb0d66f760ac048 +Subproject commit 2323a858f060a0d2a39786a619885608017d538f -- cgit 1.4.1-3-g733a5