Skip to content

Commit 1d12b7e

Browse files
Add test for anonymous reexports
1 parent e160882 commit 1d12b7e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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;

0 commit comments

Comments
 (0)