Commit ceef7e5
authored
Rollup merge of rust-lang#110371 - notriddle:notriddle/search-corrections, r=GuillaumeGomez
rustdoc: restructure type search engine to pick-and-use IDs
Fixes rust-lang#110029
Preview: https://notriddle.com/rustdoc-demo-html-3/search-corrections/std/index.html?search=-%3E%20streaming

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.File tree
6 files changed
+361
-205
lines changed- src
- librustdoc/html/static
- css
- js
- tools/rustdoc-js
- tests
- rustdoc-gui
- rustdoc-js
6 files changed
+361
-205
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1259 | 1259 | | |
1260 | 1260 | | |
1261 | 1261 | | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1262 | 1266 | | |
1263 | 1267 | | |
1264 | 1268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
142 | | - | |
| 145 | + | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
| |||
0 commit comments