rust/tests/parser
Nicholas Nethercote 90af751966 Move emit_stashed_diagnostic call in rustfmt.
This call was added to `parse_crate_mod` in #121487, to fix a case where
a stashed diagnostic wasn't emitted. But there is another path where a
stashed diagnostic might fail to be emitted if there's a parse error, if
the `build` call in `parse_crate_inner` fails before `parse_crate_mod`
is reached.

So this commit moves the `emit_stashed_diagnostic` call outwards, from
`parse_crate_mod` to `format_project`, just after the
`Parser::parse_crate` call. This should be far out enough to catch any
parsing errors.

Fixes #121517.
2024-02-26 10:45:45 +11:00
..
issue-4126 fix: backport fix for submod parser errors 2020-06-11 21:49:40 -05:00
unclosed-delims fix(parser): better unclosed delims handling 2020-11-02 18:31:51 -06:00
issue_4418.rs tests: add test for panic on new_parser_from_file 2020-11-02 18:31:51 -06:00
stashed-diag2.rs Move emit_stashed_diagnostic call in rustfmt. 2024-02-26 10:45:45 +11:00
stashed-diag.rs Explicitly call emit_stashed_diagnostics. 2024-02-23 16:09:51 +11:00