Commit 12fa44b
Ojus Chugh
Respect public-dependency when documenting deps
Fixes #2025
When the public-dependency feature is enabled, cargo doc now only
documents direct dependencies and their public dependencies recursively.
This reduces documentation clutter by excluding transitive private
dependencies that users don't need to know about.
Behavior:
- Without public-dependency: all deps documented (backward compatible)
- With public-dependency enabled:
* Direct dependencies always documented
* Transitive deps only if marked public
This allows library authors to control their documentation surface by
marking which dependencies are part of their public API.1 parent 172fb93 commit 12fa44b
1 file changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
640 | 649 | | |
641 | 650 | | |
642 | 651 | | |
| |||
657 | 666 | | |
658 | 667 | | |
659 | 668 | | |
660 | | - | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
661 | 683 | | |
662 | 684 | | |
663 | 685 | | |
| |||
0 commit comments