]> git.proxmox.com Git - cargo.git/commit - src/doc/src/commands/cargo-doc.md
Auto merge of #10172 - ehuss:doc-lib-before-bin, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 13 Dec 2021 15:38:31 +0000 (15:38 +0000)
committerbors <bors@rust-lang.org>
Mon, 13 Dec 2021 15:38:31 +0000 (15:38 +0000)
commit3aaa8f975d9ee29778bb79945f28dc772375d206
tree448fdaecd8999cd3cbd6b874d1b08304668f30bc
parentfe69af39d88c31c0284234fa8ddfba37e63029ba
parenta09fbf2ef815206f71ff613532eb5f0823a75d88
Auto merge of #10172 - ehuss:doc-lib-before-bin, r=alexcrichton

Document lib before bin.

This changes it so that documenting a library is required to finish before documenting a binary. The issue is that the binary may have intra-doc links to the library. If they are documented concurrently, then the links will sometimes fail (since it is a race).   Or, if doing `cargo doc --bins`, then the library docs wouldn't exist at all.

Note that in the tests this introduces some more name collisions if you just run `cargo doc --bins` and there is a colliding library/binary name. There is some risk that someone might be trying to run the commands separately to get around the collision error, but I think it is unlikely.