pub fn remap_project_errors(
source: &str,
cache_dir: &Path,
file_map: Option<&SourceMap>,
) -> Result<Vec<RemappedError>, CompileError>Expand description
Remap every rustc error over a project’s GENERATED Rust back to the LOGOS
source line it came from — the build path uses this so a generated-code
failure points at the LOGOS the user wrote, not main.rs. Compiles with the
source-mapped codegen (whose line numbers the map indexes), runs
cargo check --message-format=json, and remaps each diagnostic’s primary
span. Returns Ok(vec![]) when nothing maps (caller falls back to raw cargo
output).