diff options
| author | Michael Howell <michael@notriddle.com> | 2024-12-12 13:26:09 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2024-12-12 13:29:18 -0700 |
| commit | 8200c1e52e1f67cee0546b288a72154407cf1c0a (patch) | |
| tree | b95d165a2107787e4b3c53a503c5224541ff6d75 /tests/rustdoc-js | |
| parent | a94fce97e3ab3b2fd5773b13ca4f087dd84dd19b (diff) | |
| download | rust-8200c1e52e1f67cee0546b288a72154407cf1c0a.tar.gz rust-8200c1e52e1f67cee0546b288a72154407cf1c0a.zip | |
rustdoc-search: fix mismatched path when parent re-exported twice
Diffstat (limited to 'tests/rustdoc-js')
| -rw-r--r-- | tests/rustdoc-js/reexport.js | 9 | ||||
| -rw-r--r-- | tests/rustdoc-js/reexport.rs | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/rustdoc-js/reexport.js b/tests/rustdoc-js/reexport.js index 9021cc2e90f..0b9415dd3e4 100644 --- a/tests/rustdoc-js/reexport.js +++ b/tests/rustdoc-js/reexport.js @@ -14,4 +14,13 @@ const EXPECTED = [ { 'path': 'reexport', 'name': 'AnotherOne' }, ], }, + { + 'query': 'fn:Equivalent::equivalent', + 'others': [ + // These results must never contain `reexport::equivalent::NotEquivalent`, + // since that path does not exist. + { 'path': 'equivalent::Equivalent', 'name': 'equivalent' }, + { 'path': 'reexport::NotEquivalent', 'name': 'equivalent' }, + ], + }, ]; diff --git a/tests/rustdoc-js/reexport.rs b/tests/rustdoc-js/reexport.rs index 0b3718cd9a3..ecbbeca5ea8 100644 --- a/tests/rustdoc-js/reexport.rs +++ b/tests/rustdoc-js/reexport.rs @@ -2,6 +2,15 @@ // This is a DWIM case, since renaming the export probably means the intent is also different. // For the de-duplication case of exactly the same name, see reexport-dedup +//@ aux-crate:equivalent=equivalent.rs +//@ compile-flags: --extern equivalent +//@ aux-build:equivalent.rs +//@ build-aux-docs +#[doc(inline)] +pub extern crate equivalent; +#[doc(inline)] +pub use equivalent::Equivalent as NotEquivalent; + pub mod fmt { pub struct Subscriber; } |
