Skip to content

Commit

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

Add regression test for reexports in search results

Fixes rust-lang#86337.

r? `@notriddle`
  • Loading branch information
notriddle authored Oct 30, 2022
2 parents b544523 + eb2dd95 commit 7080630
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 7080630

Please sign in to comment.