diff options
| author | bors <bors@rust-lang.org> | 2022-06-01 14:44:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-01 14:44:20 +0000 |
| commit | 8256e97231332ef49bd47a74b1809e785ecc78df (patch) | |
| tree | 65a1388d9fd21c48e6549dc3d6c0367aac4fe577 /compiler/rustc_data_structures/src | |
| parent | 395a09c3dafe0c7838c9ca41d2b47bb5e79a5b6d (diff) | |
| parent | 85fdef087c889846644192553dc6f4ebaf7b4494 (diff) | |
| download | rust-8256e97231332ef49bd47a74b1809e785ecc78df.tar.gz rust-8256e97231332ef49bd47a74b1809e785ecc78df.zip | |
Auto merge of #97622 - JohnTitor:rollup-4qoxrjn, r=JohnTitor
Rollup of 9 pull requests Successful merges: - #94647 (Expose `get_many_mut` and `get_many_unchecked_mut` to HashMap) - #97216 (Ensure we never consider the null pointer dereferencable) - #97399 (simplify code of finding arg index in `opt_const_param_of`) - #97470 (rustdoc: add more test coverage) - #97498 (Corrected EBNF grammar for from_str) - #97562 (Fix comment in `poly_project_and_unify_type`) - #97580 (Add regression test for #71546) - #97611 (Tweak insert docs) - #97616 (Remove an unnecessary `Option`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/sso/set.rs | 5 |
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() |
