rustc_mir_transform::coverage::counters

Function sort_and_cancel

Source
fn sort_and_cancel<T: Ord>(
    pos: Vec<T>,
    neg: Vec<T>,
) -> (Vec<Option<T>>, Vec<Option<T>>)
Expand description

Given two lists:

  • Sorts each list.
  • Converts each list to Vec<Option<T>>.
  • Scans for values that appear in both lists, and cancels them out by replacing matching pairs of values with None.