From 37d4302c255ca5786196b245905f8ab6b2f36fde Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 24 Feb 2023 18:15:56 +0100 Subject: [PATCH 1/2] 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 00000000000..0aaaeee1051 --- /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 00000000000..5b1a9c6662d --- /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 {} +} From c934ee8300040802842e772dbf94fa73e2025fb8 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 25 Feb 2023 12:12:21 +0100 Subject: [PATCH 2/2] Don't run issue-107918.rs test on windows --- tests/rustdoc-ui/issue-107918.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/rustdoc-ui/issue-107918.rs b/tests/rustdoc-ui/issue-107918.rs index 5b1a9c6662d..13788df0fc9 100644 --- a/tests/rustdoc-ui/issue-107918.rs +++ b/tests/rustdoc-ui/issue-107918.rs @@ -1,6 +1,7 @@ // aux-build:panic-handler.rs // compile-flags: --document-private-items // build-pass +// ignore-windows #![no_std] #![no_main]