mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00

cargo: prevent dashes in lib.name The TOML parser of Cargo currently refuses `lib.name` entries that contain dashes. Unfortunately, it uses the package-name as default if no explicit `lib.name` entry is specified. This package-name, however, can contain dashes. Cargo documentation states that the package name is converted first, yet this was never implemented by the code-base. Fix this inconsistency and convert the package name to a suitable crate-name first. This fixes #12780. It is an alternative to #12640.