about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-02-26 16:06:03 +0100
committerGitHub <noreply@github.com>2024-02-26 16:06:03 +0100
commit9d5ab73523c5e19316c277d77f7dd8f5247d8bec (patch)
treea8bf4217f240044f29e014b2ed9611dcd4173d5d /compiler/rustc_codegen_llvm/src
parent6e3ece3aac82686ea90823610c92596fe66e8c7d (diff)
parentbf7d1b54e8a3195a0f52516d48659d9f1270436d (diff)
downloadrust-9d5ab73523c5e19316c277d77f7dd8f5247d8bec.tar.gz
rust-9d5ab73523c5e19316c277d77f7dd8f5247d8bec.zip
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`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions