rustdoc-search: fix mismatched path when parent re-exported twice
This commit is contained in:
parent
a94fce97e3
commit
8200c1e52e
3 changed files with 26 additions and 0 deletions
|
@ -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' },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue