You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the nightly toolchain, rustfmt removes the last letter from any derive statement, i.e.
#[derive(Debug)]
becomes
#[derive(Debu)]
In my rustfmt.toml, I have the following line:
# "Block" | "Visual"indent_style = "Visual"
If I comment this line (or change it to "Block", which is the default) the issue goes away (but formatting happens completely differently, of course, so this is not a viable fix).
To Reproduce
Heads up: I'm only able to reproduce this on my laptop. It does not reproduce on my workstation. However I have no clue what the difference between the systems may be; they're both Debian sid on latest updates, both have Rust installed and updated via rustup, both have the exact same setup in terms of terminal emulator, shell, environment,etc.
To reproduce - if you can - simple throw the following into a file (let's call it test.rs):
Closing as duplicate of #4584, already fixed in the latest 1.4.30 version which I believe will be in the next published nightly (otherwise the following one)
Describe the bug
On the nightly toolchain, rustfmt removes the last letter from any derive statement, i.e.
#[derive(Debug)]
becomes
#[derive(Debu)]
In my rustfmt.toml, I have the following line:
If I comment this line (or change it to
"Block"
, which is the default) the issue goes away (but formatting happens completely differently, of course, so this is not a viable fix).To Reproduce
Heads up: I'm only able to reproduce this on my laptop. It does not reproduce on my workstation. However I have no clue what the difference between the systems may be; they're both Debian sid on latest updates, both have Rust installed and updated via rustup, both have the exact same setup in terms of terminal emulator, shell, environment,etc.
To reproduce - if you can - simple throw the following into a file (let's call it test.rs):
Put the file in a directory together with a rustfmt.toml file containing:
Finally, run
rustfmt test.rs
.Expected behavior
I expect rustfmt not to remove letters from my code in this fashion.
Meta
The text was updated successfully, but these errors were encountered: