]> git.proxmox.com Git - cargo.git/commit
Rename `--prepare-for` to `--edition`, drop arg
authorAlex Crichton <alex@alexcrichton.com>
Wed, 1 Aug 2018 00:01:09 +0000 (17:01 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 1 Aug 2018 22:03:15 +0000 (15:03 -0700)
commitb2b120e9fd2e2f777ee53fc9456e7f31224c81d2
tree395f3be7b203600ac6952dfb5b322c90090b4f05
parent63a08ee7d5f5bb06ebbafcfb921989ac06969f97
Rename `--prepare-for` to `--edition`, drop arg

This commit tweaks the UI of `cargo fix` for the edition. Previously you'd
execute `cargo fix --prepare-for 2018`, but that's a lot of typing! Plus it's
some manual data that Cargo can already infer.

Instead, after this commit, you now type `cargo fix --edition`, and that's it!
The idea is that this'll tell Cargo to fix code for the *next* edition,
inferring whatever edition is in use and figuring out what to pass to rustc.

Functionality-wise this should be the exact same as `--prepare-for 2018` though

If others agree w/ this change I'll send a PR to the edition guide after this
merges!
src/bin/cargo/commands/fix.rs
src/cargo/ops/fix.rs
tests/testsuite/fix.rs