You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A-parserArea: Syntactic analysis / parsing of Rust source code (to an AST) as done by `rustc_parse`C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
Recently there was a change in rustc to normalize newlines (CRLF -> LF) early during processing (#62948). This caused a change in the JSON output offsets. While the line/column values were unaffected (since they do not include the newlines in the counts), the byte_start/byte_end values were affected as they are calculated from the spans that use post-normalization positions.
As a result, the byte_start/byte_end values cannot be used to index the actual bytes of the original file, if the original file content was affected by the CRLF normalization. This is most evident in rustfix on Windows.
A-parserArea: Syntactic analysis / parsing of Rust source code (to an AST) as done by `rustc_parse`C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
Activity
petrochenkov commentedon Oct 3, 2019
cc @matklad
Rollup merge of rust-lang#65074 - Rantanen:json-byte-pos, r=matklad
Rollup merge of rust-lang#65074 - Rantanen:json-byte-pos, r=matklad
Rollup merge of rust-lang#65074 - Rantanen:json-byte-pos, r=matklad
Rollup merge of rust-lang#65074 - Rantanen:json-byte-pos, r=matklad