rust/tests
dswij 086a7c9780
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
2025-06-14 15:58:39 +00:00
..
test_utils
ui Fix needless_doctest_main panic when doctest is invalid (#15052) 2025-06-14 15:58:39 +00:00
ui-cargo Merge commit '9f9a822509' into clippy-subtree-update 2025-02-28 23:27:09 +01:00
ui-internal Merge commit '0450db33a5' into clippy-subtree-update 2025-05-15 19:28:39 +02:00
ui-toml Fix collapsible_else_if FP on conditionally compiled stmt (#14906) 2025-06-13 15:45:00 +00:00
workspace_test
check-fmt.rs
clippy.toml Merge commit '0621446356' into clippy-subtree-update 2025-04-22 18:24:43 +02:00
compile-test.rs Remove incremental test, disable incremental for cargo tests 2025-05-28 15:17:32 +00:00
config-metadata.rs Merge commit 'a109190d70' into clippy-subtree-update 2024-10-18 13:44:06 +02:00
dogfood.rs Merge commit '0450db33a5' into clippy-subtree-update 2025-05-15 19:28:39 +02:00
integration.rs Merge commit '0450db33a5' into clippy-subtree-update 2025-05-15 19:28:39 +02:00
lint_message_convention.rs Merge commit '1e5237f4a5' into clippy-subtree-update 2025-03-20 22:34:29 +01:00
missing-test-files.rs Merge commit '51d49c1ae2' into clippy-subtree-update 2025-01-28 19:33:54 +01:00
symbols-used.rs Test that all interned symbols are referenced in Clippy sources 2025-05-25 11:52:24 +02:00
versioncheck.rs Clippy: skip check_host_compiler check in rustc testsuite 2025-02-28 23:27:22 +01:00
workspace.rs