diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-23 13:20:33 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-23 16:09:51 +1100 |
| commit | 41da3d6f2fa3ef3eb49c576d82c6879d4b336ef8 (patch) | |
| tree | 3a232cf7cc06e3f50937f397e3f5864b5a1b1ae8 /src/tools/rustfmt/tests/parser | |
| parent | c5f69bdd5173a948e0131f934fa7c4cbf5e0b55f (diff) | |
| download | rust-41da3d6f2fa3ef3eb49c576d82c6879d4b336ef8.tar.gz rust-41da3d6f2fa3ef3eb49c576d82c6879d4b336ef8.zip | |
Explicitly call `emit_stashed_diagnostics`.
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.
Diffstat (limited to 'src/tools/rustfmt/tests/parser')
| -rw-r--r-- | src/tools/rustfmt/tests/parser/stashed-diag.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/parser/stashed-diag.rs b/src/tools/rustfmt/tests/parser/stashed-diag.rs new file mode 100644 index 00000000000..3b0b543e610 --- /dev/null +++ b/src/tools/rustfmt/tests/parser/stashed-diag.rs @@ -0,0 +1,3 @@ +#![u={static N;}] + +fn main() {} |
