Skip to main content

prune_unreachable_prelude_mapped

Function prune_unreachable_prelude_mapped 

Source
pub fn prune_unreachable_prelude_mapped(
    source: &str,
) -> (String, Vec<(usize, usize)>)
Expand description

prune_unreachable_prelude plus the KEPT byte ranges of the INPUT (merged and in order), so a consumer that parses the pruned text can remap an offset back to the original source. Deep check uses this to drop EXACTLY what largo build drops (it prunes the same way before it parses) while keeping every rustc finding mapped to the user’s own line. The ranges partition the kept output: concatenating source[s..e] for each (s, e) reproduces the pruned string.