mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
db277f5284
This feature extends rustdoc to support the syntax that most users will naturally attempt to use to search for diverging functions. Part of #60485 It's already possible to do this search with `primitive:never`, but that's not what the Rust language itself uses, so nobody will try it if they aren't told or helped along.
47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
// exact-check
|
|
|
|
const EXPECTED = [
|
|
{
|
|
'query': '-> !',
|
|
'others': [
|
|
{ 'path': 'never_search', 'name': 'loops' },
|
|
],
|
|
},
|
|
{
|
|
'query': '-> never',
|
|
'others': [
|
|
{ 'path': 'never_search', 'name': 'loops' },
|
|
{ 'path': 'never_search', 'name': 'returns' },
|
|
],
|
|
},
|
|
{
|
|
'query': '!',
|
|
'in_args': [
|
|
{ 'path': 'never_search', 'name': 'impossible' },
|
|
{ 'path': 'never_search', 'name': 'box_impossible' },
|
|
],
|
|
},
|
|
{
|
|
'query': 'never',
|
|
'in_args': [
|
|
{ 'path': 'never_search', 'name': 'impossible' },
|
|
{ 'path': 'never_search', 'name': 'uninteresting' },
|
|
{ 'path': 'never_search', 'name': 'box_impossible' },
|
|
{ 'path': 'never_search', 'name': 'box_uninteresting' },
|
|
],
|
|
},
|
|
{
|
|
'query': 'box<!>',
|
|
'in_args': [
|
|
{ 'path': 'never_search', 'name': 'box_impossible' },
|
|
],
|
|
},
|
|
{
|
|
'query': 'box<never>',
|
|
'in_args': [
|
|
{ 'path': 'never_search', 'name': 'box_impossible' },
|
|
{ 'path': 'never_search', 'name': 'box_uninteresting' },
|
|
],
|
|
},
|
|
];
|