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