1
Fork 0

rustdoc: implement bag semantics for function parameter search

This tweak to the function signature search engine makes things so that,
if a type is repeated in the search query, it'll only match if the
function actually includes it that many times.
This commit is contained in:
Michael Howell 2023-03-18 15:36:56 -07:00
parent 8826b68c62
commit 5451fe7d7c
3 changed files with 94 additions and 26 deletions

View file

@ -0,0 +1,20 @@
// exact-check
const QUERY = [
'P',
'P, P',
];
const EXPECTED = [
{
'in_args': [
{ 'path': 'search_bag_semantics', 'name': 'alacazam' },
{ 'path': 'search_bag_semantics', 'name': 'abracadabra' },
],
},
{
'others': [
{ 'path': 'search_bag_semantics', 'name': 'abracadabra' },
],
},
];