Skip to content
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

fix Issue 4020: problem reformatting block comments #4071

Merged
merged 3 commits into from
Apr 14, 2020

Conversation

ahl
Copy link
Contributor

@ahl ahl commented Mar 5, 2020

Fixes #4020

prior to the fix, the tests fail like this:

Mismatch at tests/source/issue-4020.rs:1:
 // rustfmt-wrap_comments: true
 
-/** foobar */
+/** foobar **/
 const foo1: u32 = 0;
 
 /**

Mismatch at tests/source/issue-4020.rs:7:
- * foobar
- */
+ ** foobar
+ **/
 const foo2: u32 = 0;

@@ -0,0 +1,9 @@
// rustfmt-wrap_comments: true

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's mentioned in the Contributing docs, but for awareness, when the test is just ensuring rustfmt doesn't modify the formatting like this one you only need the test file under target and can skip the one under source

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that! Removed now.

@davepacheco
Copy link

Thanks for the fix, @ahl!

It looks like this would fix #4020. Are there any blockers for landing this change?

@calebcartwright
Copy link
Member

Are there any blockers for landing this change?

FWIW, no, I believe this is good to go. Just needs an approval from someone with merge perms. It'll likely be a while longer even after merge before this fix is released and available though due to the current release cycle for rustfmt.

@ahl
Copy link
Contributor Author

ahl commented Mar 20, 2020

@calebcartwright is there anything I can do to nudge it along?

@calebcartwright
Copy link
Member

Unfortunately probably not @ahl. There's not a lot of folks on the rustfmt wg, and seems they've been very busy and unavailable recently.

Thank you for the PR though, hopefully it won't be too much longer!

@ahl ahl mentioned this pull request Mar 31, 2020
@ahl
Copy link
Contributor Author

ahl commented Apr 12, 2020

@topecongiro you merged #4079 -- would you mind taking a look at this one? Thanks.

@karyon
Copy link
Contributor

karyon commented Oct 27, 2021

backported in #4253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustfmt keeps reformatting C-style doc comment
4 participants