Skip to content

Commit

Permalink
Add regression test for rust-lang#123435
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Apr 4, 2024
1 parent 0ee34e1 commit 5a0be6f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/rustdoc/inline_cross/inline_hidden.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}

0 comments on commit 5a0be6f

Please sign in to comment.