mirror of
https://github.com/rust-lang/cargo
synced 2024-10-13 11:12:25 +00:00
78109c0d2c
Have cargo add --optional <dep> create a <dep> = "dep:<dep> feature ### What does this PR try to resolve? `cargo add --optional <dep>` would create a `<dep> = "dep:<dep>` feature iff - `rust-version` is unset or is new enough for the syntax - `dep:<dep>` doesn't already exist Fixes https://github.com/rust-lang/cargo/issues/11010 ### How should we test and review this PR? As the `dep:` syntax is only available starting with Rust 1.60. this pr maintains the previous usage convention in the earlier version. run ```shell cargo add --optional <dep> ``` with different rust-version to verify. |
||
---|---|---|
.. | ||
build-std | ||
testsuite |