-
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 inserts a made-up impl Trait
definition into types
#5086
Comments
Thanks for the report. Having a major case of déjà vu with this one |
SummaryWas doing a little digging into this. TLDR; I think the issue is caused by using the Bug DetailsWhen calling Lines 1523 to 1527 in eee8f04
After we add the generic bounds to the output result (code responsible for that added bellow) we end up with the string Lines 1573 to 1580 in eee8f04
Because we have a Lines 1615 to 1636 in eee8f04
And lastly because of how Lines 1874 to 1881 in eee8f04
Proposed SolutionAfter going through the code it seems to me that passing |
As of current master, rustfmt applies the following incorrect diff to this valid Rust code:
To reproduce:
cargo run --bin rustfmt repro.rs
The text was updated successfully, but these errors were encountered: