-
Notifications
You must be signed in to change notification settings - Fork 39
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
Force rustfmt to use 2018 Rust edition in pre-commit hook #218
Force rustfmt to use 2018 Rust edition in pre-commit hook #218
Conversation
Could you add a comment (in I tried looking for it myself, but all I could find was rust-lang/rustfmt#4645, which was closed with someone saying the reporter was using the wrong version of Could you also point to a file in the repo (I mean in the discussion here rather than in the code) that needs the |
To answer my own question, an example of something that needs It seems that |
+1+1=+1 reached, merging. |
f602560
d3713a4
to
f602560
Compare
Oops, seems there was some issue with the signing of commits. I've resigned and pushed again. @ShaleXIONG, @gbryant-arm can you take another look and approve, ready for merging? |
+1 reached, merging. |
There is a bug in
rustfmt
currently that ignores the edition set inCargo.toml
files and defaults to 2015 edition. This means it errors on any staged file containing theasync
keyword, and any other change introduced in rust 2018.The solution is to force the Rust edition to use when calling
rustfmt
.