about summary refs log tree commit diff
path: root/src/tools/rustfmt/tests/parser
AgeCommit message (Collapse)AuthorLines
2024-02-26Move `emit_stashed_diagnostic` call in rustfmt.Nicholas Nethercote-0/+3
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-23Explicitly call `emit_stashed_diagnostics`.Nicholas Nethercote-0/+3
Commit 72b172b in #121206 changed things so that `emit_stashed_diagnostics` is only called from `run_compiler`. But rustfmt doesn't use `run_compiler`, so it needs to call `emit_stashed_diagnostics` itself to avoid an abort in `DiagCtxtInner::drop` when stashed diagnostics occur. Fixes #121450.
2021-05-14Add 'src/tools/rustfmt/' from commit '7872306edf2e11a69aaffb9434088fd66b46a863'Caleb Cartwright-0/+19
git-subtree-dir: src/tools/rustfmt git-subtree-mainline: e659b6de9170c055b6f2d16e2679b22d67297b13 git-subtree-split: 7872306edf2e11a69aaffb9434088fd66b46a863