Skip to content

Commit 6b33245

Browse files
Add regression test for rust-lang#46506
1 parent 23a76a8 commit 6b33245

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// This is a regression test for <https://github.com/rust-lang/rust/issues/46506>.
2+
// This test ensures that if public re-exported is re-exported, it won't be inlined.
3+
4+
#![crate_name = "foo"]
5+
6+
// @has 'foo/associations/index.html'
7+
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
8+
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Traits'
9+
// @has - '//*[@id="main-content"]//a[@href="trait.GroupedBy.html"]' 'GroupedBy'
10+
// @has 'foo/associations/trait.GroupedBy.html'
11+
pub mod associations {
12+
mod belongs_to {
13+
pub trait GroupedBy {}
14+
}
15+
pub use self::belongs_to::GroupedBy;
16+
}
17+
18+
// @has 'foo/prelude/index.html'
19+
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
20+
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Re-exports'
21+
// @has - '//*[@id="main-content"]//*[@id="reexport.GroupedBy"]' 'pub use associations::GroupedBy;'
22+
pub mod prelude {
23+
pub use associations::GroupedBy;
24+
}

0 commit comments

Comments
 (0)