Make note of Hash in Borrow's docs
This should be a bit more prominent. Fixes #27109
This commit is contained in:
parent
d03456183e
commit
4a68a7e198
1 changed files with 3 additions and 0 deletions
|
|
@ -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.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue