diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-04-21 06:44:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-21 06:44:31 +0200 |
| commit | ea01135f67671ea3fbd36c72014e026f24292e29 (patch) | |
| tree | e1392862abf52348e29362516762491c67870d87 | |
| parent | a8e239468bc8e85be6b85245f2f406d58e930ed2 (diff) | |
| parent | 6b33245c5bfad0a114fbd9e1f1b9e544949ae9ec (diff) | |
| download | rust-ea01135f67671ea3fbd36c72014e026f24292e29.tar.gz rust-ea01135f67671ea3fbd36c72014e026f24292e29.zip | |
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`
| -rw-r--r-- | tests/rustdoc/issue-46506-pub-reexport-of-pub-reexport.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/rustdoc/issue-46506-pub-reexport-of-pub-reexport.rs b/tests/rustdoc/issue-46506-pub-reexport-of-pub-reexport.rs new file mode 100644 index 00000000000..d8953eaf597 --- /dev/null +++ b/tests/rustdoc/issue-46506-pub-reexport-of-pub-reexport.rs @@ -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; +} |
