]>
Commit | Line | Data |
---|---|---|
b039eaaf SL |
1 | trait MapLookup<Q> { |
2 | type MapValue; | |
3 | } | |
4 | ||
5 | impl<K> MapLookup<K> for K { | |
6 | type MapValue = K; | |
7 | } | |
8 | ||
9 | trait Map: MapLookup<<Self as Map>::Key> { | |
10 | type Key; | |
11 | } | |
12 | ||
13 | impl<K> Map for K { | |
14 | type Key = K; | |
15 | } | |
85aaf69f | 16 | |
223e47cc | 17 | |
d9579d0f | 18 | fn main() { |
b039eaaf | 19 | let _ = &() |
dc9dc135 | 20 | as &dyn Map<Key=u32,MapValue=u32>; |
5bcae85e | 21 | //~^ ERROR E0038 |
c34b1796 | 22 | } |