-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
A-editionsArea: edition-specific issuesArea: edition-specific issuesC-bugCategory: bugCategory: bugCommand-fixE-easyExperience: EasyExperience: Easy
Description
Problem
I want to convert a crate in a workspace from 2015 to 2018 edition. Because another crate in the workspace already uses 2018 edition, cargo tries to convert it to 2021 and gives an error that 2021 is still unstable.
$ cargo fix --edition
Checking boring-sys v1.1.1 (/home/jnelson/src/boring/boring-sys)
Checking boring v1.1.6 (/home/jnelson/src/boring/boring)
error: cannot migrate boring-sys/src/lib.rs to edition 2021
Edition 2021 is unstable and not allowed in this release, consider trying the nightly release channel.
Migrating boring/src/lib.rs from 2015 edition to 2018
error: could not compile `boring-sys`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
Steps
git clone https://github.com/cloudflare/boring/
cd boring
cargo fix --edition
Possible Solution(s)
Only try to migrate crates to the latest stable edition unless the user explicitly opts-in to upgrading to the unstable edition.
Notes
Output of cargo version
:
cargo 1.54.0 (5ae8d74b3 2021-06-22)
Metadata
Metadata
Assignees
Labels
A-editionsArea: edition-specific issuesArea: edition-specific issuesC-bugCategory: bugCategory: bugCommand-fixE-easyExperience: EasyExperience: Easy