about summary refs log tree commit diff
path: root/tests/rustdoc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-08-26 16:03:12 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-09-27 11:29:50 +0200
commit77885fef2cd9a7f9daa4f95336f0cfdeb62b3016 (patch)
tree65d6fa476ea49bafef412323035fb7b0e8f11906 /tests/rustdoc
parentef8b2a26caccba46584e4753c3091218d4a2e17d (diff)
downloadrust-77885fef2cd9a7f9daa4f95336f0cfdeb62b3016.tar.gz
rust-77885fef2cd9a7f9daa4f95336f0cfdeb62b3016.zip
Improve code comments and extend tests for `doc_cfg` feature
Diffstat (limited to 'tests/rustdoc')
-rw-r--r--tests/rustdoc/doc_auto_cfg_reexports.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/rustdoc/doc_auto_cfg_reexports.rs b/tests/rustdoc/doc_auto_cfg_reexports.rs
index f6315e9d49d..ecfe9aabcfe 100644
--- a/tests/rustdoc/doc_auto_cfg_reexports.rs
+++ b/tests/rustdoc/doc_auto_cfg_reexports.rs
@@ -20,3 +20,16 @@ mod x {
 //      'Available on non-crate feature pistache only.'
 #[cfg(not(feature = "pistache"))]
 pub use crate::x::B;
+
+// Now checking that `cfg`s are not applied on non-inlined reexports.
+pub mod pub_sub_mod {
+    //@ has 'foo/pub_sub_mod/index.html'
+    // There should be only only item with `cfg` note.
+    //@ count - '//*[@class="stab portability"]' 1
+    // And obviously the item should be "blabla".
+    //@ has - '//dt' 'blablaNon-pistache'
+    #[cfg(not(feature = "pistache"))]
+    pub fn blabla() {}
+
+    pub use self::blabla as another;
+}