about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorAriel Davis <ariel.z.davis@icloud.com>2022-05-31 22:08:14 -0700
committerAriel Davis <ariel.z.davis@icloud.com>2022-05-31 22:08:14 -0700
commitb02146a370e8e07186d4bd2c264699300ca925df (patch)
tree612f3b759a7cc96fd459d80125e128573f8bf53c /compiler/rustc_data_structures/src
parent02916c4c75912f70b651c0b20b501444ce2ca231 (diff)
downloadrust-b02146a370e8e07186d4bd2c264699300ca925df.tar.gz
rust-b02146a370e8e07186d4bd2c264699300ca925df.zip
Tweak insert docs
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/sso/set.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_data_structures/src/sso/set.rs b/compiler/rustc_data_structures/src/sso/set.rs
index f71522d3714..4fda3adb7b8 100644
--- a/compiler/rustc_data_structures/src/sso/set.rs
+++ b/compiler/rustc_data_structures/src/sso/set.rs
@@ -126,9 +126,10 @@ impl<T: Eq + Hash> SsoHashSet<T> {
 
     /// Adds a value to the set.
     ///
-    /// If the set did not have this value present, `true` is returned.
+    /// Returns whether the value was newly inserted. That is:
     ///
-    /// If the set did have this value present, `false` is returned.
+    /// - If the set did not previously contain this value, `true` is returned.
+    /// - If the set already contained this value, `false` is returned.
     #[inline]
     pub fn insert(&mut self, elem: T) -> bool {
         self.map.insert(elem, ()).is_none()