rust/tests/rustdoc/inline_cross/inline_hidden.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
745 B
Rust
Raw Normal View History

//@ aux-build:rustdoc-hidden.rs
//@ build-aux-docs
//@ ignore-cross-compile
extern crate rustdoc_hidden;
//@ has inline_hidden/index.html
2024-04-04 18:10:52 +02:00
// Ensures this item is not inlined.
//@ !has - '//*[@id="reexport.Foo"]/code' 'pub use rustdoc_hidden::Foo;'
#[doc(no_inline)]
pub use rustdoc_hidden::Foo;
2024-04-04 18:10:52 +02:00
// Even if the foreign item has `doc(hidden)`, we should be able to inline it.
2025-01-17 21:41:51 +01:00
//@ has - '//dt/a[@class="struct"]' 'Inlined'
2024-04-04 18:10:52 +02:00
#[doc(inline)]
pub use rustdoc_hidden::Foo as Inlined;
// Even with this import, we should not see `Foo`.
//@ count - '//dt' 3
2025-01-17 21:41:51 +01:00
//@ has - '//dt/a[@class="struct"]' 'Bar'
//@ has - '//dt/a[@class="fn"]' 'foo'
2024-04-04 18:10:52 +02:00
pub use rustdoc_hidden::*;
//@ has inline_hidden/fn.foo.html
//@ !has - '//a/@title' 'Foo'
pub fn foo(_: Foo) {}