File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ // Regression test for <https://github.com/rust-lang/rust/issues/60522>.
2+ // This test ensures that the `banana` and `peach` modules don't appear twice
3+ // and that the visible modules are not the re-exported ones.
4+
5+ #![ crate_name = "foo" ]
6+
7+ // @has 'foo/index.html'
8+ // @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
9+ // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Modules'
10+ // @count - '//*[@id="main-content"]/*[@class="item-table"]//*[@class="mod"]' 2
11+ // @has - '//*[@id="main-content"]//*[@class="mod"]' 'banana'
12+ // @has - '//*[@id="main-content"]//*[@href="banana/index.html"]' 'banana'
13+ // @has - '//*[@id="main-content"]//*[@class="mod"]' 'peach'
14+ // @has - '//*[@id="main-content"]//*[@href="peach/index.html"]' 'peach'
15+
16+ pub use crate :: my_crate:: * ;
17+
18+ mod my_crate {
19+ pub mod banana {
20+ pub struct Yellow ;
21+ }
22+ pub mod peach {
23+ pub struct Pink ;
24+ }
25+ }
26+
27+ // @has 'foo/banana/index.html'
28+ // @count - '//*[@id="main-content"]//*[@class="struct"]' 1
29+ // @has - '//*[@id="main-content"]//*[@class="struct"]' 'Brown'
30+ pub mod banana {
31+ pub struct Brown ;
32+ }
33+
34+ // @has 'foo/peach/index.html'
35+ // @count - '//*[@id="main-content"]//*[@class="struct"]' 1
36+ // @has - '//*[@id="main-content"]//*[@class="struct"]' 'Pungent'
37+ pub mod peach {
38+ pub struct Pungent ;
39+ }
You can’t perform that action at this time.
0 commit comments