]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/anonymous-reexport.rs
Rollup merge of #107412 - tshepang:needless-check, r=wesleywiser
[rust.git] / tests / rustdoc / anonymous-reexport.rs
1 #![crate_name = "foo"]
2
3 // This test ensures we don't display anonymous (non-inline) re-exports of public items.
4
5 // @has 'foo/index.html'
6 // @has - '//*[@id="main-content"]' ''
7 // We check that the only "h2" present is for "Bla".
8 // @count - '//*[@id="main-content"]/h2' 1
9 // @has - '//*[@id="main-content"]/h2' 'Structs'
10 // @count - '//*[@id="main-content"]//a[@class="struct"]' 1
11
12 mod ext {
13     pub trait Foo {}
14     pub trait Bar {}
15     pub struct S;
16 }
17
18 pub use crate::ext::Foo as _;
19 pub use crate::ext::Bar as _;
20 pub use crate::ext::S as _;
21
22 pub struct Bla;