From 2ea9e04bf71e85746453b26d3bebe4d0400b7421 Mon Sep 17 00:00:00 2001 From: nzrq <42440961+nzrq@users.noreply.github.com> Date: Fri, 3 Jun 2022 13:05:57 -0400 Subject: [PATCH] Add note to documentation of HashSet::intersection --- library/std/src/collections/hash/set.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/library/std/src/collections/hash/set.rs b/library/std/src/collections/hash/set.rs index 19428fe9a233..6ca4b7fa2d9e 100644 --- a/library/std/src/collections/hash/set.rs +++ b/library/std/src/collections/hash/set.rs @@ -588,6 +588,13 @@ where /// Visits the values representing the intersection, /// i.e., the values that are both in `self` and `other`. /// + /// Note: this operation does not guarantee which collection + /// is visited from `self` or `other`. This has consequences + /// for values which may be defined as equal by the `Eq` trait + /// but which are not physically equivalent (eg. they may have + /// fields which differ or do not participate in the definition + /// of equivalence). + /// /// # Examples /// /// ```