Commit 05c6f32
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 rust-lang#160171 parent b60f08b commit 05c6f32
1 file changed
+22
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1364 | 1364 | | |
1365 | 1365 | | |
1366 | 1366 | | |
| 1367 | + | |
1367 | 1368 | | |
1368 | 1369 | | |
1369 | | - | |
1370 | | - | |
| 1370 | + | |
| 1371 | + | |
1371 | 1372 | | |
1372 | 1373 | | |
1373 | 1374 | | |
1374 | | - | |
| 1375 | + | |
1375 | 1376 | | |
1376 | 1377 | | |
1377 | 1378 | | |
| |||
1380 | 1381 | | |
1381 | 1382 | | |
1382 | 1383 | | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
1383 | 1387 | | |
1384 | 1388 | | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
1385 | 1399 | | |
1386 | | - | |
| 1400 | + | |
1387 | 1401 | | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
1391 | 1405 | | |
1392 | 1406 | | |
1393 | 1407 | | |
| |||
1668 | 1682 | | |
1669 | 1683 | | |
1670 | 1684 | | |
1671 | | - | |
| 1685 | + | |
1672 | 1686 | | |
1673 | 1687 | | |
1674 | 1688 | | |
| |||
0 commit comments