diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-16530.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-16530.rs b/src/test/ui/issues/issue-16530.rs new file mode 100644 index 000000000..25817a2a6 --- /dev/null +++ b/src/test/ui/issues/issue-16530.rs @@ -0,0 +1,15 @@ +// run-pass +#![allow(deprecated)] + +use std::hash::{SipHasher, Hasher, Hash}; + +#[derive(Hash)] +struct Empty; + +pub fn main() { + let mut s1 = SipHasher::new(); + Empty.hash(&mut s1); + let mut s2 = SipHasher::new(); + Empty.hash(&mut s2); + assert_eq!(s1.finish(), s2.finish()); +} |