Rollup merge of #110611 - GuillaumeGomez:regression-test-pub-reexport-pub-reexport, r=notriddle

Add regression test for #46506

Fixes #46506.

This issue was fixed very likely alongside the others when we cleaned up the re-exports code.

r? `@notriddle`
This commit is contained in:
Matthias Krüger 2023-04-21 06:44:31 +02:00 committed by GitHub
commit ea01135f67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,24 @@
// This is a regression test for <https://github.com/rust-lang/rust/issues/46506>.
// This test ensures that if public re-exported is re-exported, it won't be inlined.
#![crate_name = "foo"]
// @has 'foo/associations/index.html'
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Traits'
// @has - '//*[@id="main-content"]//a[@href="trait.GroupedBy.html"]' 'GroupedBy'
// @has 'foo/associations/trait.GroupedBy.html'
pub mod associations {
mod belongs_to {
pub trait GroupedBy {}
}
pub use self::belongs_to::GroupedBy;
}
// @has 'foo/prelude/index.html'
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Re-exports'
// @has - '//*[@id="main-content"]//*[@id="reexport.GroupedBy"]' 'pub use associations::GroupedBy;'
pub mod prelude {
pub use associations::GroupedBy;
}