about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-02-26 00:46:26 +0100
committerGitHub <noreply@github.com>2023-02-26 00:46:26 +0100
commit5196e9114c2ee42d02034f1a08add968cabd4d1f (patch)
treeaf708d0a82dacff8c2a9973cdbfed91c6e06829b
parentfa10a21bd26cf5031c0ca878587839b9296629eb (diff)
parentc934ee8300040802842e772dbf94fa73e2025fb8 (diff)
downloadrust-5196e9114c2ee42d02034f1a08add968cabd4d1f.tar.gz
rust-5196e9114c2ee42d02034f1a08add968cabd4d1f.zip
Rollup merge of #108431 - GuillaumeGomez:regression-test-for-107918, r=notriddle
Add regression test for #107918

Fixes https://github.com/rust-lang/rust/issues/107918.

r? ```@notriddle```
-rw-r--r--tests/rustdoc-ui/auxiliary/panic-handler.rs9
-rw-r--r--tests/rustdoc-ui/issue-107918.rs12
2 files changed, 21 insertions, 0 deletions
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..13788df0fc9
--- /dev/null
+++ b/tests/rustdoc-ui/issue-107918.rs
@@ -0,0 +1,12 @@
+// aux-build:panic-handler.rs
+// compile-flags: --document-private-items
+// build-pass
+// ignore-windows
+
+#![no_std]
+#![no_main]
+
+#[panic_handler]
+fn panic(_: &core::panic::PanicInfo) -> ! {
+    loop {}
+}