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

Update default edition to 2018 #3517

Closed
dtolnay opened this issue Apr 17, 2019 · 0 comments · Fixed by #3942
Closed

Update default edition to 2018 #3517

dtolnay opened this issue Apr 17, 2019 · 0 comments · Fixed by #3942
Milestone

Comments

@dtolnay
Copy link
Member

dtolnay commented Apr 17, 2019

The current behavior of rustfmt as of 8ec0750 is:

$ echo 'use ::serde::Serialize; mod serde {}' | cargo run --bin rustfmt

use serde::Serialize;
mod serde {}

That is, by default the rustfmt cli command is assuming edition 2015. This assumption actually breaks the meaning of some 2018 style imports as seen in #3501.

Quoting from @topecongiro in #3501 (comment):

As the default edition of rustc and cargo are both 2018, I think it's reasonable to change the default edition of rustfmt to 2018 in 2.0.

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 a pull request may close this issue.

2 participants