blob: b487cdd5c7574e33f6a4bfbc8e7ec48713af980b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// compile-pass
pub trait Hasher {
type State;
fn hash<T: Hash<
<Self as Hasher>::State
>>(&self, value: &T) -> u64;
}
pub trait Hash<S> {
fn hash(&self, state: &mut S);
}
fn main() {}
|