Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: restructure type search engine to pick-and-use IDs #110371

Merged
merged 6 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,10 @@ a.tooltip:hover::after {
background-color: var(--search-error-code-background-color);
}

.search-corrections {
font-weight: normal;
}

#src-sidebar-toggle {
position: sticky;
top: 0;
Expand Down
5 changes: 4 additions & 1 deletion src/librustdoc/html/static/js/externs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function initSearch(searchIndex){}
/**
* @typedef {{
* name: string,
* id: integer,
* fullPath: Array<string>,
* pathWithoutLast: Array<string>,
* pathLast: string,
Expand Down Expand Up @@ -36,6 +37,8 @@ let ParserState;
* args: Array<QueryElement>,
* returned: Array<QueryElement>,
* foundElems: number,
* literalSearch: boolean,
* corrections: Array<{from: string, to: integer}>,
* }}
*/
let ParsedQuery;
Expand Down Expand Up @@ -139,7 +142,7 @@ let FunctionSearchType;

/**
* @typedef {{
* name: (null|string),
* id: (null|number),
* ty: (null|number),
* generics: Array<FunctionType>,
* }}
Expand Down
Loading