// Regression test for #77656 // check-pass trait Value: PartialOrd {} impl Value for T {} trait Distance where Self: PartialOrd<::Value>, Self: PartialOrd, { type Value: Value; } impl Distance for T { type Value = T; } trait Proximity { type Distance: Distance; } fn main() {}