1
Fork 0

rustdoc: add support for type filters in arguments and generics

This makes sense, since the search index has the information in it,
and it's more useful for function signature searches since a
function signature search's item type is, by definition, some type
of function (there's more than one, but not very many).
This commit is contained in:
Michael Howell 2023-02-28 18:17:59 -07:00
parent 3ff4d56650
commit e600c0ba0e
15 changed files with 301 additions and 150 deletions

View file

@ -5,6 +5,8 @@ const QUERY = [
'Aaaaaaa -> bool',
'Aaaaaaa -> usize',
'Read -> u64',
'trait:Read -> u64',
'struct:Read -> u64',
'bool -> u64',
'Ddddddd -> u64',
'-> Ddddddd'
@ -36,6 +38,17 @@ const EXPECTED = [
{ 'path': 'generics_impl::Ddddddd', 'name': 'ggggggg' },
],
},
{
// trait:Read -> u64
'others': [
{ 'path': 'generics_impl::Ddddddd', 'name': 'eeeeeee' },
{ 'path': 'generics_impl::Ddddddd', 'name': 'ggggggg' },
],
},
{
// struct:Read -> u64
'others': [],
},
{
// bool -> u64
'others': [