Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1a7132d
rustdoc-search: fix incorrect doc comment
notriddle Apr 14, 2023
4c11822
rustdoc: restructure type search engine to pick-and-use IDs
notriddle Apr 15, 2023
1ece1ea
Stablize raw-dylib, link_ordinal and -Cdlltool
dpaoliello Mar 27, 2023
b6f81e0
rustdoc-search: give longer notification for type corrections
notriddle Apr 19, 2023
e0a7462
rustdoc-search: clean up `checkIfInGenerics` call at end of `checkType`
notriddle Apr 20, 2023
7529d87
rustdoc-search: make type name correction choice deterministic
notriddle Apr 20, 2023
395840c
rustdoc-search: use more descriptive "x not found; y instead" message
notriddle Apr 20, 2023
d5e7ac5
avoid duplicating TLS state between test std and realstd
RalfJung Apr 28, 2023
ed468ee
Encode def span for foreign RPITITs
compiler-errors Apr 30, 2023
bc68de9
remove pointless `FIXME` in `bootstrap::download`
onur-ozkan May 1, 2023
6197e4d
Don't `use RibKind::*`
WaffleLapkin May 1, 2023
0fa5920
Remove "RibKind" suffix from `RibKind` variants
WaffleLapkin May 1, 2023
6edb4ca
Don't print backtrace on ICEs in `issue-86800.rs`.
nnethercote May 1, 2023
5f45c69
Improve filtering in `default-backtrace-ice.rs`.
nnethercote May 1, 2023
eb23f47
check array type of repeat exprs is wf
BoxyUwU May 2, 2023
6af761a
Add some triagebot notifications for nnethercote.
nnethercote May 2, 2023
51b9f78
Amend the triagebot comment for `Cargo.lock` changes.
nnethercote May 2, 2023
44613c1
Rollup merge of #109677 - dpaoliello:rawdylib, r=michaelwoerister,wes…
Dylan-DPC May 3, 2023
09666d7
Rollup merge of #110371 - notriddle:notriddle/search-corrections, r=G…
Dylan-DPC May 3, 2023
0b1d571
Rollup merge of #110946 - RalfJung:tls-realstd, r=m-ou-se
Dylan-DPC May 3, 2023
988c41f
Rollup merge of #111039 - compiler-errors:foreign-span-rpitit, r=tmiasko
Dylan-DPC May 3, 2023
68b605b
Rollup merge of #111052 - nnethercote:fix-ice-test, r=Nilstrieb
Dylan-DPC May 3, 2023
23eb9b1
Rollup merge of #111069 - ozkanonur:remove-pointless-fixme, r=albertl…
Dylan-DPC May 3, 2023
8d88f59
Rollup merge of #111070 - WaffleLapkin:break_ribs, r=lcnr
Dylan-DPC May 3, 2023
1831409
Rollup merge of #111100 - BoxyUwU:array_repeat_expr_wf, r=compiler-er…
Dylan-DPC May 3, 2023
5b16a2f
Rollup merge of #111112 - nnethercote:triagebot, r=compiler-errors
Dylan-DPC May 3, 2023
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
Prev Previous commit
Next Next commit
rustdoc: restructure type search engine to pick-and-use IDs
This change makes it so, instead of mixing string distance with
type unification, function signature search works by
mapping names to IDs at the start, reporting to the user any
cases where it had to make corrections, and then matches with
IDs when going through the items.

This only changes function searches. Name searches are left alone,
and corrections are only done when there's a single item in the
search query.
  • Loading branch information
notriddle committed Apr 17, 2023
commit 4c11822aebd9e9c3bbe798f14fa10ec6db3f3937
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