-
Notifications
You must be signed in to change notification settings - Fork 924
Regression (rustc): Formatting UFCS function calls produces invalid code (needstest) #64
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
Comments
I ran this through idempotent tests and got this: fn header_name<T: Header>() -> &'static str {
let name = <T as Header>::header_name(();
name
} UPD: my rustc was kinda outdated fn header_name<T: Header>() -> &'static str {
let name = <();
name
} |
Given that this is caused by a regression in rustc (by the sounds of it), I'm going to put money on this being due to an incorrect span from the parser. |
I've opened an issue for this here: rust-lang/rust#25969. |
The underlying issue has been resolved: rust-lang/rust#25994. I can confirm that the test case above is now formatted correctly when using the master branch of rustc. |
This just needs a test now. (thanks for fixing the rustc bug @marcusklaas) |
Closed by #97 |
is formatted to
which is clearly not intended.
The text was updated successfully, but these errors were encountered: