-
Notifications
You must be signed in to change notification settings - Fork 183
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
Use cargo fmt
instead of rustfmt
#289
Comments
Could you provide a code snippet that it's formatting incorrectly? I'm not experiencing this issue myself, but am wondering if using rustfmt is actually the issue here. While playing with replacing the rustfmt calls, I found that |
I stumbled upon it as a part of the Rust 2018 changes - where rustfmt did not respect the "Edition" directive in cargo.toml. I guess this is no longer the case so the priority of this should not be that critical IMO |
Certainly still seems to be the case for me. See rust-lang/rustfmt#3724 |
rustfmt does not respect Cargo.toml because it is intended for a stand-alone tool, even without cargo. You could still pass |
For Rust 2018, rustfmt does not work correctly (e.g. removes leading
::
fromuse
statements. The fact thatrust-mode
runs it instead ofcargo fmt
makes it problematic for writing 2018 code...It would be nice to have this mode use the recommended
cargo fmt
command instead ofrustfmt
.Thanks in advance!
The text was updated successfully, but these errors were encountered: