Commit fb74e62
committed
rustdoc: emit JS paths for struct-like variants
On the backend, rustdoc now emits `paths` entries to a crate's search
index for struct-like enum variants, and index items of type structfield
which belong to such variants point to their variant parents in the
`paths` table, rather than their enum grandparents. The path entry for
a variant is the fully qualified module path plus the enum name.
On the frontend, the search code recognizes structfields belonging to
structlike variants in the `paths` table and re-constructs the URL to
the field's anchor on the enum documentation page.
closes #160171 parent 4125b27 commit fb74e62
2 files changed
+25
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1487 | 1487 | | |
1488 | 1488 | | |
1489 | 1489 | | |
1490 | | - | |
1491 | | - | |
| 1490 | + | |
| 1491 | + | |
1492 | 1492 | | |
1493 | 1493 | | |
1494 | 1494 | | |
| |||
1503 | 1503 | | |
1504 | 1504 | | |
1505 | 1505 | | |
1506 | | - | |
1507 | | - | |
1508 | | - | |
1509 | | - | |
1510 | | - | |
1511 | | - | |
1512 | | - | |
1513 | 1506 | | |
1514 | 1507 | | |
1515 | 1508 | | |
| |||
1524 | 1517 | | |
1525 | 1518 | | |
1526 | 1519 | | |
1527 | | - | |
| 1520 | + | |
1528 | 1521 | | |
1529 | 1522 | | |
1530 | 1523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1306 | 1306 | | |
1307 | 1307 | | |
1308 | 1308 | | |
| 1309 | + | |
1309 | 1310 | | |
1310 | 1311 | | |
1311 | | - | |
1312 | | - | |
| 1312 | + | |
| 1313 | + | |
1313 | 1314 | | |
1314 | 1315 | | |
1315 | 1316 | | |
1316 | | - | |
| 1317 | + | |
1317 | 1318 | | |
1318 | 1319 | | |
1319 | 1320 | | |
| |||
1322 | 1323 | | |
1323 | 1324 | | |
1324 | 1325 | | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
1325 | 1329 | | |
1326 | 1330 | | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
1327 | 1341 | | |
1328 | | - | |
| 1342 | + | |
1329 | 1343 | | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
1333 | 1347 | | |
1334 | 1348 | | |
1335 | 1349 | | |
| |||
1611 | 1625 | | |
1612 | 1626 | | |
1613 | 1627 | | |
1614 | | - | |
| 1628 | + | |
1615 | 1629 | | |
1616 | 1630 | | |
1617 | 1631 | | |
| |||
0 commit comments