Rollup merge of #103758 - GuillaumeGomez:reexports-search-result-test, r=notriddle

Add regression test for reexports in search results

Fixes https://github.com/rust-lang/rust/issues/86337.

r? ``@notriddle``
This commit is contained in:
Michael Howell 2022-10-30 19:31:39 -07:00 committed by GitHub
commit 4473fcd6f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,17 @@
// exact-check
const QUERY = ['Subscriber', 'AnotherOne'];
const EXPECTED = [
{
'others': [
{ 'path': 'reexport::fmt', 'name': 'Subscriber' },
{ 'path': 'reexport', 'name': 'FmtSubscriber' },
],
},
{
'others': [
{ 'path': 'reexport', 'name': 'AnotherOne' },
],
},
];

View File

@ -0,0 +1,11 @@
// This test enforces that the (renamed) reexports are present in the search results.
pub mod fmt {
pub struct Subscriber;
}
mod foo {
pub struct AnotherOne;
}
pub use foo::AnotherOne;
pub use fmt::Subscriber as FmtSubscriber;