about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-10-10 18:22:23 +0200
committerGitHub <noreply@github.com>2021-10-10 18:22:23 +0200
commit0c04b1fc031325e8e836721951bada1dd9942919 (patch)
treee21b3bbdc68aceb74fae6f77b24bfae54068433e /library/alloc/src
parent8aec76caf8b0dba8a53432e4af81dbe0f87356e4 (diff)
parent475e9925a71648b48767c03b342fe327c003c15e (diff)
downloadrust-0c04b1fc031325e8e836721951bada1dd9942919.tar.gz
rust-0c04b1fc031325e8e836721951bada1dd9942919.zip
Rollup merge of #89718 - jkugelman:must-use-is_condition-tests, r=joshtriplett
Add #[must_use] to is_condition tests

There's nothing insightful to say about these so I didn't write any extra explanations.

Parent issue: #89692
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/collections/btree/set.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs
index 16150ceeb62..f4c10100982 100644
--- a/library/alloc/src/collections/btree/set.rs
+++ b/library/alloc/src/collections/btree/set.rs
@@ -534,6 +534,7 @@ impl<T> BTreeSet<T> {
     /// b.insert(1);
     /// assert_eq!(a.is_disjoint(&b), false);
     /// ```
+    #[must_use]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn is_disjoint(&self, other: &BTreeSet<T>) -> bool
     where
@@ -559,6 +560,7 @@ impl<T> BTreeSet<T> {
     /// set.insert(4);
     /// assert_eq!(set.is_subset(&sup), false);
     /// ```
+    #[must_use]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn is_subset(&self, other: &BTreeSet<T>) -> bool
     where
@@ -638,6 +640,7 @@ impl<T> BTreeSet<T> {
     /// set.insert(2);
     /// assert_eq!(set.is_superset(&sub), true);
     /// ```
+    #[must_use]
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn is_superset(&self, other: &BTreeSet<T>) -> bool
     where