rustdoc: search for tuples and unit by type with ()
This commit is contained in:
parent
a75fed74b6
commit
f6a045cc6b
9 changed files with 616 additions and 54 deletions
80
tests/rustdoc-js/tuple-unit.js
Normal file
80
tests/rustdoc-js/tuple-unit.js
Normal file
|
@ -0,0 +1,80 @@
|
|||
// exact-check
|
||||
|
||||
const EXPECTED = [
|
||||
{
|
||||
'query': '()',
|
||||
'returned': [
|
||||
{ 'path': 'tuple_unit', 'name': 'side_effect' },
|
||||
{ 'path': 'tuple_unit', 'name': 'one' },
|
||||
{ 'path': 'tuple_unit', 'name': 'two' },
|
||||
{ 'path': 'tuple_unit', 'name': 'nest' },
|
||||
],
|
||||
'in_args': [],
|
||||
},
|
||||
{
|
||||
'query': 'primitive:unit',
|
||||
'returned': [
|
||||
{ 'path': 'tuple_unit', 'name': 'side_effect' },
|
||||
],
|
||||
'in_args': [],
|
||||
},
|
||||
{
|
||||
'query': 'primitive:tuple',
|
||||
'returned': [
|
||||
{ 'path': 'tuple_unit', 'name': 'one' },
|
||||
{ 'path': 'tuple_unit', 'name': 'two' },
|
||||
{ 'path': 'tuple_unit', 'name': 'nest' },
|
||||
],
|
||||
'in_args': [],
|
||||
},
|
||||
{
|
||||
'query': '(P)',
|
||||
'returned': [
|
||||
{ 'path': 'tuple_unit', 'name': 'not_tuple' },
|
||||
{ 'path': 'tuple_unit', 'name': 'one' },
|
||||
{ 'path': 'tuple_unit', 'name': 'two' },
|
||||
],
|
||||
'in_args': [],
|
||||
},
|
||||
{
|
||||
'query': '(P,)',
|
||||
'returned': [
|
||||
{ 'path': 'tuple_unit', 'name': 'one' },
|
||||
{ 'path': 'tuple_unit', 'name': 'two' },
|
||||
],
|
||||
'in_args': [],
|
||||
},
|
||||
{
|
||||
'query': '(P, P)',
|
||||
'returned': [
|
||||
{ 'path': 'tuple_unit', 'name': 'two' },
|
||||
],
|
||||
'in_args': [],
|
||||
},
|
||||
{
|
||||
'query': '(P, ())',
|
||||
'returned': [],
|
||||
'in_args': [],
|
||||
},
|
||||
{
|
||||
'query': '(Q, ())',
|
||||
'returned': [
|
||||
{ 'path': 'tuple_unit', 'name': 'nest' },
|
||||
],
|
||||
'in_args': [],
|
||||
},
|
||||
{
|
||||
'query': '(R)',
|
||||
'returned': [
|
||||
{ 'path': 'tuple_unit', 'name': 'nest' },
|
||||
],
|
||||
'in_args': [],
|
||||
},
|
||||
{
|
||||
'query': '(u32)',
|
||||
'returned': [
|
||||
{ 'path': 'tuple_unit', 'name': 'nest' },
|
||||
],
|
||||
'in_args': [],
|
||||
},
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue