about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libcollections/borrow.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcollections/borrow.rs b/src/libcollections/borrow.rs
index 1c75636cb05..a7b4c17314b 100644
--- a/src/libcollections/borrow.rs
+++ b/src/libcollections/borrow.rs
@@ -38,6 +38,9 @@ use self::Cow::*;
 /// type can be borrowed as multiple different types. In particular, `Vec<T>:
 /// Borrow<Vec<T>>` and `Vec<T>: Borrow<[T]>`.
 ///
+/// If you are implementing `Borrow` and both `Self` and `Borrowed` implement
+/// `Hash`, `Eq`, and/or `Ord`, they must produce the same result.
+///
 /// `Borrow` is very similar to, but different than, `AsRef`. See
 /// [the book][book] for more.
 ///