about summary refs log tree commit diff
path: root/tests/rustdoc/attributes-re-export-2021-edition.rs
diff options
context:
space:
mode:
authorPredrag Gruevski <obi1kenobi82@gmail.com>2025-07-23 00:00:01 +0000
committerPredrag Gruevski <obi1kenobi82@gmail.com>2025-07-23 00:00:01 +0000
commit45231fa599583edc95843aaa4f23b12f762e01e7 (patch)
tree9e19d84d3e27be22aac1ae218602ec7daa890669 /tests/rustdoc/attributes-re-export-2021-edition.rs
parenta7a1618e6c835f1f00940ad72203d05808209a0d (diff)
downloadrust-45231fa599583edc95843aaa4f23b12f762e01e7.tar.gz
rust-45231fa599583edc95843aaa4f23b12f762e01e7.zip
[rustdoc] Display unsafe attrs with edition 2024 `unsafe()` wrappers.
Diffstat (limited to 'tests/rustdoc/attributes-re-export-2021-edition.rs')
-rw-r--r--tests/rustdoc/attributes-re-export-2021-edition.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/rustdoc/attributes-re-export-2021-edition.rs b/tests/rustdoc/attributes-re-export-2021-edition.rs
new file mode 100644
index 00000000000..04ee6c273dd
--- /dev/null
+++ b/tests/rustdoc/attributes-re-export-2021-edition.rs
@@ -0,0 +1,13 @@
+// Tests that attributes are correctly copied onto a re-exported item.
+//@ edition:2024
+#![crate_name = "re_export"]
+
+//@ has 're_export/fn.thingy2.html' '//pre[@class="rust item-decl"]' '#[unsafe(no_mangle)]'
+pub use thingymod::thingy as thingy2;
+
+mod thingymod {
+    #[unsafe(no_mangle)]
+    pub fn thingy() {
+
+    }
+}