]> git.proxmox.com Git - cargo.git/commit
Auto merge of #9268 - ehuss:2021-fix-edition-v2-warning, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 16 Mar 2021 21:36:55 +0000 (21:36 +0000)
committerbors <bors@rust-lang.org>
Tue, 16 Mar 2021 21:36:55 +0000 (21:36 +0000)
commit90691f2bfe9a50291a98983b1ed2feab51d5ca55
tree30862eb635771090e1bcddf83cdf4ad9f71e42fe
parent841179ee60ec8bd7e4deb9942865e458d1ad79a3
parent6c69e9d95ba2c8002a5988df6303480876e194a0
Auto merge of #9268 - ehuss:2021-fix-edition-v2-warning, r=alexcrichton

Add report if `cargo fix --edition` changes features.

This adds a small report if using `cargo fix --edition` to transition from 2018 to 2021 to determine if the new resolver will result in different features.

There is a gauntlet of checks that must pass before it even tries to show the differences:
* If the resolver is already specified, skip.
* If in a virtual workspace, skip (no way to specify global edition).
* If not migrating the root package, skip. The edition only changes the resolver in the root package.
* If not migrating all targets, skip. It's uncertain if the user intends to set the package edition or not.

Closes #9048
src/cargo/core/workspace.rs
src/cargo/ops/cargo_compile.rs
src/cargo/ops/resolve.rs