1f93be1bb3
Fix the start/end byte positions in the compiler JSON output Track the changes made during normalization in the `SourceFile` and use this information to correct the `start_byte` and `end_byte` fields in the JSON output. This should ensure the start/end byte fields can be used to index the original file, even if Rust normalized the source code for parsing purposes. Both CRLF to LF and BOM removal are handled with this one. The rough plan was discussed with @matklad in rust-lang-nursery/rustfix#176 - although I ended up going with `u32` offset tracking so I wouldn't need to deal with `u32 + i32` arithmetics when applying the offset to the span byte positions. Fixes #65029 |
||
---|---|---|
.. | ||
dynamic_lib | ||
build.rs | ||
Cargo.toml | ||
creader.rs | ||
cstore_impl.rs | ||
cstore.rs | ||
decoder.rs | ||
dependency_format.rs | ||
dynamic_lib.rs | ||
encoder.rs | ||
error_codes.rs | ||
foreign_modules.rs | ||
lib.rs | ||
link_args.rs | ||
locator.rs | ||
native_libs.rs | ||
schema.rs | ||
table.rs |