Add regression test for #123435

This commit is contained in:
Guillaume Gomez 2024-04-04 18:10:52 +02:00
parent 0ee34e1914
commit 5a0be6ff3d
1 changed files with 14 additions and 0 deletions

View File

@ -4,9 +4,23 @@
extern crate rustdoc_hidden;
// @has inline_hidden/index.html
// Ensures this item is not inlined.
// @has - '//*[@id="reexport.Foo"]/code' 'pub use rustdoc_hidden::Foo;'
#[doc(no_inline)]
pub use rustdoc_hidden::Foo;
// Even if the foreign item has `doc(hidden)`, we should be able to inline it.
// @has - '//*[@class="item-name"]/a[@class="struct"]' 'Inlined'
#[doc(inline)]
pub use rustdoc_hidden::Foo as Inlined;
// Even with this import, we should not see `Foo`.
// @count - '//*[@class="item-name"]' 4
// @has - '//*[@class="item-name"]/a[@class="struct"]' 'Bar'
// @has - '//*[@class="item-name"]/a[@class="fn"]' 'foo'
pub use rustdoc_hidden::*;
// @has inline_hidden/fn.foo.html
// @!has - '//a/@title' 'Foo'
pub fn foo(_: Foo) {}