You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow setting edition = "2018" in a workspace #5784
For larger projects, it could be useful to set the edition once instead of in each project's Cargo.toml file. This would then be equivalent to setting the edition key in every member project in the workspace.
Currently, the edition key is ignored instead: #5726
Reacted by Zimon Tai, Ian Hobson, Mikael Zayenz Lagerkvist, Tony Arcieri, Francesco Cinà, Stanislav Tkach, delacian, Deirdre Connolly, Bennet Bleßmann, Jamen Marz and 1 more
Yea, I think RFC 2906 is the solution to this. There was a lot of discussion in RFC 2906 about whether or not workspace fields should be implicitly inherited, and it was decided that it is best to not make anything implicit, edition in particular. It looks like the edition field is already supported, so closing in favor of #8415.
Activity
dwijnand commentedon Jul 24, 2018
Like #5661, but less granular 🙂.
(I mention it also because one might want to tackle these in one swing.)
lucksus commentedon Nov 23, 2018
Especially since
cargo fix --editionupdates every crate in the whole workspace.pksunkara commentedon Sep 4, 2020
With the new edition coming next year, we should look into implementing this. @ehuss Are there any blockers for this?
ehuss commentedon Sep 5, 2020
I believe it is being implemented as part of #8664.
futile commentedon Aug 15, 2021
#9684 seems to be the relevant PR now. Also bump, since the 2021 edition is coming up, and this could be relevant for migration.
epage commentedon Apr 20, 2022
Would #8415 be a viable solution for this?
You would set
workspace.edition = "2018"and then in each crate you saypackage.edition.workspace = true.ehuss commentedon Apr 20, 2022
Yea, I think RFC 2906 is the solution to this. There was a lot of discussion in RFC 2906 about whether or not workspace fields should be implicitly inherited, and it was decided that it is best to not make anything implicit, edition in particular. It looks like the edition field is already supported, so closing in favor of #8415.