rust/src/parse
Nicholas Nethercote 90af751966 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.
2024-02-26 10:45:45 +11:00
..
macros Actually, just use nonterminal_may_begin_with 2024-01-22 02:19:42 +00:00
mod.rs Merge commit '4a053f206f' into sync-rustfmt-subtree 2021-12-29 20:49:39 -06:00
parser.rs Move emit_stashed_diagnostic call in rustfmt. 2024-02-26 10:45:45 +11:00
session.rs Move emit_stashed_diagnostic call in rustfmt. 2024-02-26 10:45:45 +11:00