diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-12-14 03:54:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-14 03:54:32 +0100 |
| commit | 5b95be610e3df6c3d802a3049e358eb00291207d (patch) | |
| tree | 2f0eebaf91cea623242ea08d23b43fc5755a5245 /tests | |
| parent | 6cf13b00368f68f5cdad155e4fa919d4041db667 (diff) | |
| parent | 98318c5e66d5a56d8741186a876a84ffe33ea814 (diff) | |
| download | rust-5b95be610e3df6c3d802a3049e358eb00291207d.tar.gz rust-5b95be610e3df6c3d802a3049e358eb00291207d.zip | |
Rollup merge of #134231 - notriddle:notriddle/mismatched-path, r=GuillaumeGomez
rustdoc-search: fix mismatched path when parent re-exported twice
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rustdoc-js-std/osstring-to-string.js | 2 | ||||
| -rw-r--r-- | tests/rustdoc-js/reexport.js | 9 | ||||
| -rw-r--r-- | tests/rustdoc-js/reexport.rs | 9 |
3 files changed, 19 insertions, 1 deletions
diff --git a/tests/rustdoc-js-std/osstring-to-string.js b/tests/rustdoc-js-std/osstring-to-string.js index 3fdc0b9f24a..17bb602a502 100644 --- a/tests/rustdoc-js-std/osstring-to-string.js +++ b/tests/rustdoc-js-std/osstring-to-string.js @@ -4,6 +4,6 @@ const EXPECTED = { 'query': 'OsString -> String', 'others': [ - { 'path': 'std::ffi::os_str::OsString', 'name': 'into_string' }, + { 'path': 'std::ffi::OsString', 'name': 'into_string' }, ] }; 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; } |
