Skip to main content

refs_eq

Function refs_eq 

Source
fn refs_eq<D: Data>(a: Ref<'_, D>, b: Ref<'_, D>) -> bool
Expand description

Compare two columnar refs that have unrelated input lifetimes.

<D::Container as Borrow>::Ref<'a> is an associated-type projection through a trait, so the compiler treats it as invariant in 'a and won’t auto-shorten the inputs by variance. We instead explicitly reborrow both to a fresh, local lifetime 'x via Columnar::reborrow before letting the inner == pick up the for<'a> Ref<'a>: Eq bound on Data.