Repository navigation
Properly fixes adjustment of max_width within macros #7221
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| //@ rustfmt-format_macro_bodies: true | ||
| //@ rustfmt-chain_width: 72 | ||
|
|
||
| macro_rules! inside_macro { | ||
| () => { | ||
| let value = aaaaaaaaaaaaaaaa | ||
| .bbbbbbbbbbbbbbbb() | ||
| .cccccccccccccccc() | ||
| .ddddddddddddd(); | ||
| }; | ||
| } | ||
|
|
||
| fn outside_macro() { | ||
| if true { | ||
| let value = aaaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbb().cccccccccccccccc().ddddddddddddd(); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,3 +19,9 @@ macro_rules! long { | |
| m!(aaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbb, cccccccccccccccc, ddddddddddddddd); | ||
| }; | ||
| } | ||
|
|
||
| macro_rules! too_long { | ||
| () => { | ||
| m!(aaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbb, cccccccccccccccc, dddddddddddddddd); | ||
| }; | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NB: I was looking at the logic here a bit more closely. I know obviously that the ui tests here won't demonstrate "ah the warning went away" (that's #6933), which is the point for this PR. So my understanding is that, there's 3 cases we need to consider:
Here:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's right. The only change from this PR should now be the warning.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| //@ rustfmt-format_macro_bodies: true | ||
| //@ rustfmt-chain_width: 72 | ||
|
|
||
| macro_rules! inside_macro { | ||
| () => { | ||
| let value = aaaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbb().cccccccccccccccc().ddddddddddddd(); | ||
| }; | ||
| } | ||
|
|
||
| fn outside_macro() { | ||
| if true { | ||
| let value = aaaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbb().cccccccccccccccc().ddddddddddddd(); | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.