Files
rust/src
Matthias Krüger c18226de7d Rollup merge of #121615 - nnethercote:fix-121517, r=oli-obk
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.

r? `@oli-obk`
cc `@ytmimi`
2024-02-26 16:06:03 +01:00
..
2023-12-10 10:56:22 +08:00
2023-12-10 10:56:22 +08:00
2023-12-19 12:26:20 -08:00
2023-12-10 10:56:22 +08:00
2023-12-10 10:56:22 +08:00
2023-12-10 10:56:22 +08:00
2024-01-12 14:11:16 +03:00
2023-12-19 12:26:20 -08:00
2023-12-19 12:26:20 -08:00
2024-01-17 03:14:16 +01:00
2023-12-10 10:56:22 +08:00
2020-03-26 21:25:34 -05:00
2023-12-03 12:25:46 +01:00
2020-03-26 21:25:34 -05:00
2023-12-19 12:26:20 -08:00
2024-01-12 14:11:16 +03:00