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 | 90af751966bc170a96860aea6186f1cc7f08217a (patch) | |
| tree | e6695849f0e73913bbde34c762828d8aaa0f4126 /tests/codegen/patchable-function-entry | |
| parent | ce71137b96e32ad7d198d3a073aff722917c4fd0 (diff) | |
| download | rust-90af751966bc170a96860aea6186f1cc7f08217a.tar.gz rust-90af751966bc170a96860aea6186f1cc7f08217a.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 'tests/codegen/patchable-function-entry')
0 files changed, 0 insertions, 0 deletions
