about summary refs log tree commit diff
path: root/tests/rustdoc/inline_cross/inline_hidden.rs
blob: 095cd2d3c55f10a00552dd64fc5f506353962c10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//@ aux-build:rustdoc-hidden.rs
//@ build-aux-docs
//@ ignore-cross-compile

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) {}