rust/tests/ui/issues/issue-16530.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
289 B
Rust
Raw Normal View History

// 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());
}