diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-08-05 12:16:37 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-08-05 12:32:35 -0400 |
| commit | 4a68a7e1986c55855727c818ef272108f8fed32e (patch) | |
| tree | 7300b4e4340d687e9ab17c3ebc432345e1d7a0aa | |
| parent | d03456183e85fe7bd465bbe7c8f67885a2528444 (diff) | |
| download | rust-4a68a7e1986c55855727c818ef272108f8fed32e.tar.gz rust-4a68a7e1986c55855727c818ef272108f8fed32e.zip | |
Make note of Hash in Borrow's docs
This should be a bit more prominent. Fixes #27109
| -rw-r--r-- | src/libcollections/borrow.rs | 3 |
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. /// |
