about summary refs log tree commit diff
path: root/src/test/ui/issues/issue-16530.rs
blob: 22a6ef7fa091f568af7b1ff721ef203f0441c6d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-pass
#![allow(deprecated)]

use std::hash::{SipHasher, Hasher, Hash};

#[derive(Hash)]
struct Empty;

pub fn main() {
    let mut s1 = SipHasher::new_with_keys(0, 0);
    Empty.hash(&mut s1);
    let mut s2 = SipHasher::new_with_keys(0, 0);
    Empty.hash(&mut s2);
    assert_eq!(s1.finish(), s2.finish());
}