Commit 4a12a70
authored
Auto merge of rust-lang#34752 - ollie27:rustdoc_search, r=GuillaumeGomez
rustdoc: Fix methods in seach results
Currently methods from extern crates are sometimes added to the search
index when they shouldn't be or added with the original path rather than
the reexported path. This fixes that by making sure `cache().paths` only
contains local paths like the description for it states. It also fixes a
few minor issues with link rendering and redirect generation which would
point to local crate docs even if the docs for that crate hadn't been
generated.
Also a bug with methods implemented on traits which caused wrong paths and
so dead links in the search results has been fixed.
For example:
[before](https://doc.rust-lang.org/nightly/std/?search=is_disjoint) [after](https://ollie27.github.io/rust_doc_test/std/?search=is_disjoint)
[before](https://doc.rust-lang.org/nightly/std/?search=map_or) [after](https://ollie27.github.io/rust_doc_test/std/?search=map_or)
[before](https://doc.rust-lang.org/nightly/std/?search=unsafecell%3A%3Anew) [after](https://ollie27.github.io/rust_doc_test/std/?search=unsafecell%3A%3Anew)
[before](https://doc.rust-lang.org/nightly/std/?search=rng%3A%3Agen_) [after](https://ollie27.github.io/rust_doc_test/std/?search=rng%3A%3Agen_)
[before](https://doc.rust-lang.org/nightly/std/?search=downcast_ref) [after](https://ollie27.github.io/rust_doc_test/std/?search=downcast_ref)
Fixes rust-lang#20246File tree
4 files changed
+80
-46
lines changed- src
- librustdoc/html
- test/rustdoc
- auxiliary
4 files changed
+80
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| |||
387 | 388 | | |
388 | 389 | | |
389 | 390 | | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | 391 | | |
395 | | - | |
396 | | - | |
| 392 | + | |
| 393 | + | |
397 | 394 | | |
398 | | - | |
| 395 | + | |
399 | 396 | | |
400 | 397 | | |
401 | 398 | | |
402 | | - | |
| 399 | + | |
403 | 400 | | |
404 | 401 | | |
405 | | - | |
| 402 | + | |
406 | 403 | | |
407 | 404 | | |
408 | 405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | 252 | | |
256 | 253 | | |
257 | 254 | | |
| |||
505 | 502 | | |
506 | 503 | | |
507 | 504 | | |
508 | | - | |
| 505 | + | |
509 | 506 | | |
510 | 507 | | |
511 | 508 | | |
512 | 509 | | |
513 | 510 | | |
514 | | - | |
515 | | - | |
516 | | - | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
517 | 514 | | |
518 | 515 | | |
519 | 516 | | |
520 | | - | |
521 | | - | |
| 517 | + | |
| 518 | + | |
522 | 519 | | |
523 | 520 | | |
524 | 521 | | |
| |||
534 | 531 | | |
535 | 532 | | |
536 | 533 | | |
537 | | - | |
538 | 534 | | |
539 | 535 | | |
540 | 536 | | |
541 | 537 | | |
542 | 538 | | |
543 | 539 | | |
544 | 540 | | |
545 | | - | |
| 541 | + | |
546 | 542 | | |
547 | 543 | | |
548 | 544 | | |
| |||
753 | 749 | | |
754 | 750 | | |
755 | 751 | | |
756 | | - | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
757 | 756 | | |
758 | 757 | | |
759 | 758 | | |
| |||
1055 | 1054 | | |
1056 | 1055 | | |
1057 | 1056 | | |
1058 | | - | |
1059 | | - | |
1060 | 1057 | | |
1061 | 1058 | | |
1062 | 1059 | | |
1063 | 1060 | | |
| 1061 | + | |
1064 | 1062 | | |
1065 | 1063 | | |
1066 | 1064 | | |
| |||
1092 | 1090 | | |
1093 | 1091 | | |
1094 | 1092 | | |
1095 | | - | |
1096 | | - | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
1100 | | - | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
1101 | 1097 | | |
1102 | 1098 | | |
1103 | 1099 | | |
| |||
1127 | 1123 | | |
1128 | 1124 | | |
1129 | 1125 | | |
1130 | | - | |
1131 | 1126 | | |
1132 | 1127 | | |
1133 | 1128 | | |
| |||
1521 | 1516 | | |
1522 | 1517 | | |
1523 | 1518 | | |
1524 | | - | |
| 1519 | + | |
1525 | 1520 | | |
1526 | 1521 | | |
1527 | 1522 | | |
| |||
2106 | 2101 | | |
2107 | 2102 | | |
2108 | 2103 | | |
2109 | | - | |
| 2104 | + | |
2110 | 2105 | | |
2111 | 2106 | | |
2112 | 2107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments