Skip to main content

build_unit_table

Function build_unit_table 

Source
pub fn build_unit_table(
    _name: &str,
    kind: UnitKind,
    indices: &[usize],
    parsed: &[ParsedFile],
    out: &mut Vec<(PathBuf, CompileError)>,
) -> UnitTable
Expand description

#696: each table-construction diagnostic is attributed to the project-relative identity_path of the file whose item produced it. Every error-producing loop below iterates for &i in indices, so it shadows a local errors vec and drains it into out, tagged with parsed[i].identity_path(), at the end of each file’s pass — leaving the many inner errors.push(…) sites untouched.