about summary refs log tree commit diff
path: root/tests/ui/parser/diff-markers
AgeCommit message (Collapse)AuthorLines
2025-04-08UI tests: add missing diagnostic kinds where possibleVadim Petrochenkov-6/+6
2024-12-13Remove `Lexer`'s dependency on `Parser`.Nicholas Nethercote-46/+28
Lexing precedes parsing, as you'd expect: `Lexer` creates a `TokenStream` and `Parser` then parses that `TokenStream`. But, in a horrendous violation of layering abstractions and common sense, `Lexer` depends on `Parser`! The `Lexer::unclosed_delim_err` method does some error recovery that relies on creating a `Parser` to do some post-processing of the `TokenStream` that the `Lexer` just created. This commit just removes `unclosed_delim_err`. This change removes `Lexer`'s dependency on `Parser`, and also means that `lex_token_tree`'s return value can have a more typical form. The cost is slightly worse error messages in two obscure cases, as shown in these tests: - tests/ui/parser/brace-in-let-chain.rs: there is slightly less explanation in this case involving an extra `{`. - tests/ui/parser/diff-markers/unclosed-delims{,-in-macro}.rs: the diff marker detection is no longer supported (because that detection is implemented in the parser). In my opinion this cost is outweighed by the magnitude of the code cleanup.
2024-06-19Improve conflict marker recoveryardi-82/+151
2023-11-24Show number in error message even for one errorNilstrieb-13/+13
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-30When encountering unclosed delimiters during parsing, check for diff markersEsteban Küber-0/+59
Fix #116252.
2023-01-11Move /src/test to /testsAlbert Larsan-0/+318