0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-28 09:36:05 +01:00
rust/tests/rustdoc-js/reexport-dedup-method.js
Michael Howell f36c5af359 rustdoc-search: single result for items with multiple paths
This change uses the same "exact" paths as trait implementors
and type alias inlining to track items with multiple
reachable paths. This way, if you search for `vec`, you get
only the `std` exports of it, and not the one from `alloc`.

It still includes all the items in the search index so that
you can search for them by all available paths. For example,
try `core::option` and `std::option`, and notice that the
results page doesn't show duplicates, but still shows all
the items in their respective crates.
2024-04-08 17:07:14 -07:00

17 lines
333 B
JavaScript

// exact-check
const EXPECTED = [
{
'query': 'Subscriber dostuff',
'others': [
{ 'path': 'foo::fmt::Subscriber', 'name': 'dostuff' },
],
},
{
'query': 'AnotherOne dostuff',
'others': [
{ 'path': 'foo::AnotherOne', 'name': 'dostuff' },
],
},
];