Skip to content

Commit

Permalink
Rollup merge of #103758 - GuillaumeGomez:reexports-search-result-test…
Browse files Browse the repository at this point in the history
…, r=notriddle

Add regression test for reexports in search results

Fixes #86337.

r? ``@notriddle``
  • Loading branch information
notriddle authored Oct 31, 2022
2 parents c61a32a + eb2dd95 commit 4473fcd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/rustdoc-js/reexport.js
Original file line number Diff line number Diff line change
@@ -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' },
],
},
];
11 changes: 11 additions & 0 deletions src/test/rustdoc-js/reexport.rs
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 4473fcd

Please sign in to comment.