mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
28f17d97a9
The search sorting code already sorts by item type discriminant, putting things with smaller discriminants first. There was also a special case for sorting keywords and primitives earlier, and this commit removes it by giving them lower discriminants. The sorting code has another criteria where items with descriptions appear earlier than items without, and that criteria has higher priority than the item type. This shouldn't matter, though, because primitives and keywords normally only appear in the standard library, and it always gives them descriptions.
10 lines
226 B
JavaScript
10 lines
226 B
JavaScript
// ignore-order
|
|
|
|
const EXPECTED = {
|
|
'query': 'fn',
|
|
'others': [
|
|
{ 'path': 'std', 'name': 'fn', ty: 1 }, // 1 is for primitive types
|
|
{ 'path': 'std', 'name': 'fn', ty: 0 }, // 0 is for keywords
|
|
],
|
|
};
|