Skip to content

Commit 5a0be6f

Browse files
Add regression test for #123435
1 parent 0ee34e1 commit 5a0be6f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/rustdoc/inline_cross/inline_hidden.rs

+14
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,23 @@
44

55
extern crate rustdoc_hidden;
66

7+
// @has inline_hidden/index.html
8+
// Ensures this item is not inlined.
9+
// @has - '//*[@id="reexport.Foo"]/code' 'pub use rustdoc_hidden::Foo;'
710
#[doc(no_inline)]
811
pub use rustdoc_hidden::Foo;
912

13+
// Even if the foreign item has `doc(hidden)`, we should be able to inline it.
14+
// @has - '//*[@class="item-name"]/a[@class="struct"]' 'Inlined'
15+
#[doc(inline)]
16+
pub use rustdoc_hidden::Foo as Inlined;
17+
18+
// Even with this import, we should not see `Foo`.
19+
// @count - '//*[@class="item-name"]' 4
20+
// @has - '//*[@class="item-name"]/a[@class="struct"]' 'Bar'
21+
// @has - '//*[@class="item-name"]/a[@class="fn"]' 'foo'
22+
pub use rustdoc_hidden::*;
23+
1024
// @has inline_hidden/fn.foo.html
1125
// @!has - '//a/@title' 'Foo'
1226
pub fn foo(_: Foo) {}

0 commit comments

Comments
 (0)