From 4a68a7e1986c55855727c818ef272108f8fed32e Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Wed, 5 Aug 2015 12:16:37 -0400 Subject: [PATCH] Make note of Hash in Borrow's docs This should be a bit more prominent. Fixes #27109 --- src/libcollections/borrow.rs | 3 +++ 1 file changed, 3 insertions(+) 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: /// Borrow>` and `Vec: 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. ///