3 #![allow(unused_variables)]
4 #![allow(stable_features)]
6 // Test that we handle projection types which wind up important for
7 // resolving methods. This test was reduced from a larger example; the
8 // call to `foo()` at the end was failing to resolve because the
9 // winnowing stage of method resolution failed to handle an associated
12 // pretty-expanded FIXME #23616
14 #![feature(associated_types)]
18 fn finish(&self) -> Self::Output;
21 trait Hash<H: Hasher> {
22 fn hash(&self, h: &mut H);
27 fn hasher(&self) -> Self::Wut;
31 impl Hasher for SipHasher {
33 fn finish(&self) -> u64 { 4 }
36 impl Hash<SipHasher> for isize {
37 fn hash(&self, h: &mut SipHasher) {}
41 impl HashState for SipState {
43 fn hasher(&self) -> SipHasher { SipHasher }
52 <S as HashState>::Wut: Hasher<Output=u64>,
54 fn foo<K>(&self, k: K) where K: Hash< <S as HashState>::Wut> {}
57 fn foo<K: Hash<SipHasher>>(map: &Map<SipState>) {