Skip to content

Commit 2ea9e04

Browse files
authored
Add note to documentation of HashSet::intersection
1 parent e40d5e8 commit 2ea9e04

File tree

1 file changed

+7
-0
lines changed
  • library/std/src/collections/hash

1 file changed

+7
-0
lines changed

library/std/src/collections/hash/set.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,13 @@ where
588588
/// Visits the values representing the intersection,
589589
/// i.e., the values that are both in `self` and `other`.
590590
///
591+
/// Note: this operation does not guarantee which collection
592+
/// is visited from `self` or `other`. This has consequences
593+
/// for values which may be defined as equal by the `Eq` trait
594+
/// but which are not physically equivalent (eg. they may have
595+
/// fields which differ or do not participate in the definition
596+
/// of equivalence).
597+
///
591598
/// # Examples
592599
///
593600
/// ```

0 commit comments

Comments
 (0)