Function crates_with_own_tree
fn crates_with_own_tree(
crates: &BTreeMap<String, bool>,
) -> Result<BTreeSet<String>, Error>Expand description
Every crate whose rustdoc tree is its own, and therefore has a root page.
A crate’s rustdoc directory is its lib target’s name, not its package’s, and
the two differ here: atune_py is [lib] name = "atune", because the compiled
module has to be atune.so for import atune to work. So cargo doc --workspace writes it into the facade’s directory and there is no
atune_py/ tree at all — measured: target/doc/ has nine crate directories for
ten workspace crates, and atune_py/index.html does not exist (§1.3.114).
Read from each manifest rather than special-cased by name, and expressed as the rule that makes it decidable: a crate has a tree of its own exactly when its lib target is named after itself. Nothing here needs to know which crate that excludes.