Not formatting.
coolcatcoder opened this issue · 4 comments
coolcatcoder commented
I think I broke rustfmt as in my project it doesn't format:
let wow = 0.0;
In the playground, it removes all the whitespace. What I've tried:
- restarting vscode
- cargo clean
- cargo update
- rustup update
- cargo fmt --verbose
[proc-macro (2021)] "/home/coolcatcoder/Documents/GitHub/ransacked_and_recycled/procedural_macros/src/lib.rs" [bin (2021)] "/home/coolcatcoder/Documents/GitHub/ransacked_and_recycled/src/main.rs" rustfmt --edition 2021 /home/coolcatcoder/Documents/GitHub/ransacked_and_recycled/procedural_macros/src/lib.rs /home/coolcatcoder/Documents/GitHub/ransacked_and_recycled/src/main.rs
- cargo +nightly fmt
- cargo fmt --check (Outputted nothing.)
What further troubleshooting steps can I try? (My project is using nightly, in case that is of relevance.)
coolcatcoder commented
Huh, it somehow fixed itself, while I carred on coding, something made it start working again, I don't know what. I committed when the fmt was broken though, luckily. (I can try figure out a min code replication of the issue if you want me to?)
ytmimi commented
@coolcatcoder thanks for the report. it would be helpful to know what version of rustfmt you're using.
Also, without a code snippet that reproduces the problem there's very little anyone can do to help.