From 37d4302c255ca5786196b245905f8ab6b2f36fde Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 24 Feb 2023 18:15:56 +0100 Subject: [PATCH] Add regression test for #107918 --- tests/rustdoc-ui/auxiliary/panic-handler.rs | 9 +++++++++ tests/rustdoc-ui/issue-107918.rs | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/rustdoc-ui/auxiliary/panic-handler.rs create mode 100644 tests/rustdoc-ui/issue-107918.rs diff --git a/tests/rustdoc-ui/auxiliary/panic-handler.rs b/tests/rustdoc-ui/auxiliary/panic-handler.rs new file mode 100644 index 0000000000000..0aaaeee105147 --- /dev/null +++ b/tests/rustdoc-ui/auxiliary/panic-handler.rs @@ -0,0 +1,9 @@ +// compile-flags: -C panic=abort + +#![no_std] +#![no_main] + +#[panic_handler] +fn panic(_: &core::panic::PanicInfo) -> ! { + loop {} +} diff --git a/tests/rustdoc-ui/issue-107918.rs b/tests/rustdoc-ui/issue-107918.rs new file mode 100644 index 0000000000000..5b1a9c6662d1e --- /dev/null +++ b/tests/rustdoc-ui/issue-107918.rs @@ -0,0 +1,11 @@ +// aux-build:panic-handler.rs +// compile-flags: --document-private-items +// build-pass + +#![no_std] +#![no_main] + +#[panic_handler] +fn panic(_: &core::panic::PanicInfo) -> ! { + loop {} +}