about summary refs log tree commit diff
path: root/tests/rustdoc
diff options
context:
space:
mode:
authorJonathan Brouwer <jonathantbrouwer@gmail.com>2025-06-27 12:29:26 +0200
committerJonathan Brouwer <jonathantbrouwer@gmail.com>2025-06-27 23:31:25 +0200
commit58418d881a91e9f37b0c8fd07f0218850725efda (patch)
tree886606e4c14e1ce3a2d4ead20f17ed5a10500bb4 /tests/rustdoc
parente61dd437f33b5a640e67dc3628397689c664c17f (diff)
downloadrust-58418d881a91e9f37b0c8fd07f0218850725efda.tar.gz
rust-58418d881a91e9f37b0c8fd07f0218850725efda.zip
Fix rustdoc not correctly showing attributes with re-exports
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Diffstat (limited to 'tests/rustdoc')
-rw-r--r--tests/rustdoc/attributes-re-export.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/rustdoc/attributes-re-export.rs b/tests/rustdoc/attributes-re-export.rs
new file mode 100644
index 00000000000..458826ea8a3
--- /dev/null
+++ b/tests/rustdoc/attributes-re-export.rs
@@ -0,0 +1,13 @@
+// Tests that attributes are correctly copied onto a re-exported item.
+//@ edition:2021
+#![crate_name = "re_export"]
+
+//@ has 're_export/fn.thingy2.html' '//pre[@class="rust item-decl"]' '#[no_mangle]'
+pub use thingymod::thingy as thingy2;
+
+mod thingymod {
+    #[no_mangle]
+    pub fn thingy() {
+
+    }
+}