Skip to content

Commit c0c93be

Browse files
Addr regression test for #108679
1 parent 4c2b135 commit c0c93be

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// This test ensures that the `struct.B.html` only exists in `a`:
2+
// since `a::B` is public (and inlined too), `self::a::B` doesn't
3+
// need to be inlined as well.
4+
5+
#![crate_name = "foo"]
6+
7+
pub mod a {
8+
// @has 'foo/a/index.html'
9+
// Should only contain "Structs".
10+
// @count - '//*[@id="main-content"]//*[@class="item-table"]' 1
11+
// @has - '//*[@id="structs"]' 'Structs'
12+
// @has - '//*[@id="main-content"]//a[@href="struct.A.html"]' 'A'
13+
// @has - '//*[@id="main-content"]//a[@href="struct.B.html"]' 'B'
14+
mod b {
15+
pub struct B;
16+
}
17+
pub use self::b::B;
18+
pub struct A;
19+
}
20+
21+
// @has 'foo/index.html'
22+
// @!has - '//*[@id="structs"]' 'Structs'
23+
// @has - '//*[@id="reexports"]' 'Re-exports'
24+
// @has - '//*[@id="modules"]' 'Modules'
25+
// @has - '//*[@id="main-content"]//*[@id="reexport.A"]' 'pub use self::a::A;'
26+
// @has - '//*[@id="main-content"]//*[@id="reexport.B"]' 'pub use self::a::B;'
27+
// Should only contain "Modules" and "Re-exports".
28+
// @count - '//*[@id="main-content"]//*[@class="item-table"]' 2
29+
pub use self::a::{A, B};

0 commit comments

Comments
 (0)