diff options
| author | dswij <dharmasw@outlook.com> | 2025-06-14 15:58:39 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-14 15:58:39 +0000 |
| commit | 086a7c978063e08af2e9e6899616880986c5de68 (patch) | |
| tree | d105c65975441f3b3f357bd6dd142e5d5ece71b7 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | 506411d9d1c45fc65a87a7bd2d5edebf249234a0 (diff) | |
| parent | 7d708a45afad8a692ac6b57a3d332c07f81c2c57 (diff) | |
| download | rust-086a7c978063e08af2e9e6899616880986c5de68.tar.gz rust-086a7c978063e08af2e9e6899616880986c5de68.zip | |
Fix `needless_doctest_main` panic when doctest is invalid (#15052)
Closes rust-lang/rust-clippy#8244 Closes rust-lang/rust-clippy#15041 This feels like a bug with the compiler, because the panic happens when `Diag` is getting unwinded. However, `drop()` is already called in `.cancel()` so this should not happen. In this PR, I find a workaround to just call `emit()`, since the `DiagCtxt` here is just a `io::sink`, nothing will happen and the panic just goes away. changelog: [`needless_doctest_main`] fix panic when doctest is invalid
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
