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 |
||
|---|---|---|
| .. | ||
| test_utils | ||
| ui | ||
| ui-cargo | ||
| ui-internal | ||
| ui-toml | ||
| workspace_test | ||
| check-fmt.rs | ||
| clippy.toml | ||
| compile-test.rs | ||
| config-metadata.rs | ||
| dogfood.rs | ||
| integration.rs | ||
| lint_message_convention.rs | ||
| missing-test-files.rs | ||
| symbols-used.rs | ||
| versioncheck.rs | ||
| workspace.rs | ||