-
Notifications
You must be signed in to change notification settings - Fork 898
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
rustfmt deletes derived traits in #[derive(...)] #4584
Comments
rustfmt 1.4.27-nightly (580d826 2020-11-16) works without the error. |
I'm unable to reproduce this locally. Can you provide some additional information so that we can be better equipped to assist? Do you have a public repo or a CI run where we can observe the described behavior? |
Please do run:
file lib.rs in |
Thanks! This can be reproduced when |
Backported in v1.4.30 |
backported in #4605 |
Describe the bug
Running
cargo fmt
on my project takes all#[derive(Debug, Clone, PartialEq, Eq)]
and deletes exactly the last letter on each execution. It does not matter how many traits I derive. If I run it multiple times, it will stop at an emptyderive()
.To Reproduce
Setup a new library and add the following lines:
run
cargo fmt
Expected behavior
cargo fmt
finishes my project while I watch funny cat videos on youtube. At least rustfmt does not make my life harder than it is.Meta
The text was updated successfully, but these errors were encountered: