summary refs log tree commit diff
path: root/src/libsyntax/tests.rs
AgeCommit message (Collapse)AuthorLines
2019-10-25Rollup merge of #65074 - Rantanen:json-byte-pos, r=matkladMazdak Farrokhzad-2/+2
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
2019-10-21Fix the start/end byte positions in the compiler JSON outputMikko Rantanen-2/+2
2019-10-16panictry!(..) -> .unwrap()Mazdak Farrokhzad-2/+2
2019-10-15syntax::parse::sess -> syntax::sessMazdak Farrokhzad-1/+2
2019-09-17Replace DiagnosticBuilder with Diagnostic when emitting errorMark Rousskov-0/+1
2019-09-07Aggregation of cosmetic changes made during work on REPL PRs: libsyntaxAlexander Regueiro-9/+9
2019-09-04flatten rustc_lexer::character_properties moduleAleksey Kladov-9/+5
On the call site, `rustc_lexer::is_whitespace` reads much better than `character_properties::is_whitespace`.
2019-08-21Add terminal_width debugging flagEsteban Küber-5/+8
2019-08-15syntax_pos: `NO_EXPANSION`/`SyntaxContext::empty()` -> `SyntaxContext::root()`Vadim Petrochenkov-2/+2
For consistency with `ExpnId::root`. Also introduce a helper `Span::with_root_ctxt` for creating spans with `SyntaxContext::root()` context
2019-08-02libsyntax: Unconfigure tests during normal buildVadim Petrochenkov-0/+1254