rust/tests
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
..
cargo-fmt Merge commit '81fe905ca83cffe84322f27ca43950b617861ff7' into rustfmt-sync 2023-10-22 20:21:44 -05:00
config Merge commit '81fe905ca83cffe84322f27ca43950b617861ff7' into rustfmt-sync 2023-10-22 20:21:44 -05:00
coverage
mod-resolver Merge commit '1d8491b120223272b13451fc81265aa64f7f4d5b' into sync-from-rustfmt 2023-01-24 14:16:03 -06:00
parser Move emit_stashed_diagnostic call in rustfmt. 2024-02-26 10:45:45 +11:00
rustfmt Merge commit '81fe905ca83cffe84322f27ca43950b617861ff7' into rustfmt-sync 2023-10-22 20:21:44 -05:00
source Check that a token can begin a nonterminal kind before parsing it as a macro arg in rustfmt 2024-01-22 01:49:33 +00:00
target Rollup merge of #121035 - compiler-errors:rustfmt-asyncness, r=calebcartwright 2024-02-14 15:41:27 +01:00
writemode Merge commit '5ff7b632a95bac6955611d85040859128902c580' into sync-rustfmt-subtree 2022-03-29 23:17:30 -05:00