1 // Regression test for #77656
2 
3 // check-pass
4 
5 trait Value: PartialOrd {}
6 
7 impl<T: PartialOrd> Value for T {}
8 
9 trait Distance
10 where
11     Self: PartialOrd<<Self as Distance>::Value>,
12     Self: PartialOrd,
13 {
14     type Value: Value;
15 }
16 
17 impl<T: Value> Distance for T {
18     type Value = T;
19 }
20 
21 trait Proximity<T = Self> {
22     type Distance: Distance;
23 }
24 
25 fn main() {}
26