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

### What does this PR try to resolve? via issue #15505, Cargo currently errors on ```toml [dependencies] crc32fast = true ``` with a message about `expected a version string or a detailed dependency` It doesn’t hint that you can depend on a workspace member. This PR updates `cargo` so that when you write dep = true, the error also suggests: ```toml dep = { workspace = true } dep.workspace = true ``` ### How should we test and review this PR? In a workspace crate’s Cargo.toml, add ```toml [dependencies] crc32fast = true ``` Run `cargo build` and you should see the enhanced error with the two workspace hints. ### Additional information Regarding support for int/float, we only need a special case for boolean because they’re the only values that get the `workspace hint`. Everything else just uses the normal detailed dependency error