cargo-doc overwrites similarly-named library target with binary target #5549
Labels
A-layout
Area: target output directory layout, naming, and organization
Command-doc
S-triage
Status: This issue is waiting on initial triage.
Consider the following
Cargo.toml
(some contents are redundant, but they're there to be explicit).When
cargo doc
is run, the resulting documentation has one entry for the cratefoo_bar
, displaying the documentation extracted from the binary targetfoo-bar
. I presume this has something to do with the the historical "hyphens are underscores in crate names," and I recognize it's quite the edge case, but it just took me about half an hour to figure this out just now and I figured I'd say something about it anyway. It'd be nice if the result would be something more likefoo_bar
andfoo-bar
docs, or even something likefoo_bar_lib
andfoo_bar_bin
.I'm using cargo 1.26.0 and rustdoc 1.26.0, though I first noticed the issue using cargo nightly (2018-05-07).
The text was updated successfully, but these errors were encountered: