diff options
| author | Carol (Nichols || Goulding) <carol.nichols@gmail.com> | 2016-05-20 15:50:34 -0400 |
|---|---|---|
| committer | Carol (Nichols || Goulding) <carol.nichols@gmail.com> | 2016-05-23 10:03:44 -0400 |
| commit | 1e493fd979c826c44b2fa5d4b74302d405fbd17d (patch) | |
| tree | 02d2e434c51323ab1b64a58f867eb1d5caf51f76 /src/libcore/hash | |
| parent | 4c6b6c200befdef9d5882a8edf135efc20de905a (diff) | |
Add explanations about what derived trait implementations do
Diffstat (limited to 'src/libcore/hash')
| -rw-r--r-- | src/libcore/hash/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcore/hash/mod.rs b/src/libcore/hash/mod.rs index 4d0fed98334..7f0d7517a57 100644 --- a/src/libcore/hash/mod.rs +++ b/src/libcore/hash/mod.rs @@ -97,7 +97,9 @@ mod sip; /// In other words, if two keys are equal, their hashes should also be equal. /// `HashMap` and `HashSet` both rely on this behavior. /// -/// This trait can be used with `#[derive]`. +/// This trait can be used with `#[derive]` if all fields implement `Hash`. +/// When `derive`d, the resulting hash will be the combination of the values +/// from calling `.hash()` on each field. #[stable(feature = "rust1", since = "1.0.0")] pub trait Hash { /// Feeds this value into the state given, updating the hasher as necessary. |
