-
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 removes crucial code from macro calls (regression) #6424
Comments
Thanks for the report. I tracked this change in behavior back to rust-lang/rust#129514 |
Note that it also removes values which are not contiguous (let's say if |
@nazar-pc sorry, but I'm having a hard time understanding what you're getting at. Could you provide a code snippet? |
Sure: frame_support::construct_runtime!(
pub struct Test {
System: frame_system = 60,
SelfDomainId: pallet_domain_id = 1,
}
); In this case both will be removed too. I just assumed that in some cases it might remove things due to considering them being "the default", but no. |
Thanks for the update. No, I don't think that's the case. An explanation for what's going on here can be found at rust-lang/rust#134668 |
Probably related to #6418, but not 100% sure.
rustfmt recently started formatting code like this incorrectly:
Specifically, it removes
= NUMBER
for some reason, resulting in this:This is incorrect and not an equivalent change.
Affected version:
Version that I used previously and that worked correctly:
The text was updated successfully, but these errors were encountered: