diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-26 09:24:03 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-26 10:45:45 +1100 |
| commit | bf7d1b54e8a3195a0f52516d48659d9f1270436d (patch) | |
| tree | b31d7681d6a0066e0f8257108a10250b9ba98a48 /compiler/rustc_codegen_llvm/src/back/write.rs | |
| parent | 8c0b1fcd2914caaf1c3a1071028fb74b70c519e9 (diff) | |
| download | rust-bf7d1b54e8a3195a0f52516d48659d9f1270436d.tar.gz rust-bf7d1b54e8a3195a0f52516d48659d9f1270436d.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/write.rs')
0 files changed, 0 insertions, 0 deletions
