-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc-search: use lowercase, non-normalized name for type search
The type name ID map has underscores in its names, so the query element should have them, too.
- Loading branch information
Showing
3 changed files
with
76 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
const EXPECTED = [ | ||
{ | ||
'query': 'pid_t', | ||
'correction': null, | ||
'proposeCorrectionFrom': null, | ||
'proposeCorrectionTo': null, | ||
'others': [ | ||
{ 'path': 'underscoredtype::unix', 'name': 'pid_t' }, | ||
], | ||
'returned': [ | ||
{ 'path': 'underscoredtype::unix', 'name': 'set_pid' }, | ||
], | ||
'returned': [ | ||
{ 'path': 'underscoredtype::unix', 'name': 'get_pid' }, | ||
], | ||
}, | ||
{ | ||
'query': 'pidt', | ||
'correction': 'pid_t', | ||
'proposeCorrectionFrom': null, | ||
'proposeCorrectionTo': null, | ||
'others': [ | ||
{ 'path': 'underscoredtype::unix', 'name': 'pid_t' }, | ||
], | ||
'returned': [ | ||
{ 'path': 'underscoredtype::unix', 'name': 'set_pid' }, | ||
], | ||
'returned': [ | ||
{ 'path': 'underscoredtype::unix', 'name': 'get_pid' }, | ||
], | ||
}, | ||
{ | ||
'query': 'unix::pid_t', | ||
'correction': null, | ||
'proposeCorrectionFrom': null, | ||
'proposeCorrectionTo': null, | ||
'others': [ | ||
{ 'path': 'underscoredtype::unix', 'name': 'pid_t' }, | ||
], | ||
'returned': [ | ||
{ 'path': 'underscoredtype::unix', 'name': 'set_pid' }, | ||
], | ||
'returned': [ | ||
{ 'path': 'underscoredtype::unix', 'name': 'get_pid' }, | ||
], | ||
}, | ||
{ | ||
'query': 'unix::pidt', | ||
'correction': 'pid_t', | ||
'proposeCorrectionFrom': null, | ||
'proposeCorrectionTo': null, | ||
'others': [ | ||
{ 'path': 'underscoredtype::unix', 'name': 'pid_t' }, | ||
], | ||
'returned': [ | ||
{ 'path': 'underscoredtype::unix', 'name': 'set_pid' }, | ||
], | ||
'returned': [ | ||
{ 'path': 'underscoredtype::unix', 'name': 'get_pid' }, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pub mod unix { | ||
#[allow(non_camel_case_types)] | ||
pub type pid_t = i32; | ||
pub fn get_pid() -> pid_t { 0 } | ||
pub fn set_pid(_: pid_t) {} | ||
} |