Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Rust 2018 Edition #124

Merged
merged 3 commits into from
Dec 17, 2018
Merged

Migrate to Rust 2018 Edition #124

merged 3 commits into from
Dec 17, 2018

Conversation

Drakulix
Copy link
Member

So this a run of cargo fix --edition for all our feature combinations + actually setting edition = "2018" for our crates + adding the rust_2018_idioms lint to our warnings + fixing those + formatting.

That lint is currently not doing very much. It is supposed to fix "old-style" code and is what is running, when using cargo fix --edition-idioms. But right now that only seems to include usage of the dyn keyword for trait objects, and explicit anonymous lifetimes as well as useless extern crate definitions.

A lot more changes are recommend, like importing macros instead of using macro_use. But especially for macros this requires a hack to support all editions for libraries in the moment (e.g.) and I am not sure, if all our dependencies are prepared for that right now.

So instead lets go with the pace of ecosystem and fix up new lints as they popup in the rust_2018_idioms group in the next rust updates, instead of trying the whole code base now.

Depends on #122 & #123 (as everything needed to be compiling to run cargo fix, which is how I noticed those errors and decided to put them into our travis build).

@Drakulix Drakulix requested a review from elinorbgr December 15, 2018 21:26
@elinorbgr
Copy link
Member

Do we still need all these pub extern crate in the 2018 edition?

@Drakulix
Copy link
Member Author

Drakulix commented Dec 16, 2018

Do we still need all these pub extern crate in the 2018 edition?

Tested it and we can indeed get rid of pub extern crate without losing #[doc(hidden)] for all cases we do not need #[macro_use] for (until we fixed our macro imports sometime later).

Edit: Fixed and pushed.

@elinorbgr
Copy link
Member

Apparently there are still some fmt issues. LGTM other than that 👍

@Drakulix Drakulix merged commit 039c86d into master Dec 17, 2018
@Drakulix Drakulix deleted the edition/2018 branch December 17, 2018 22:29
Drakulix added a commit that referenced this pull request Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants