]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/normalization-probe-cycle.rs
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / normalization-probe-cycle.rs
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() {}