-
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
enum variant doc comments are wrapped before comment_width
#5801
Comments
@InsertCreativityHere Thanks for reaching out! Looks like we're reducing the shape by 1 prematurely in preparation for rewriting the enum variant when we should use the entire shape to rewrite the doc comment (and all other attributes). @HarrisonHemstreet any interest in taking this one on? Any changes would likely need to be version gated. Lines 635 to 637 in 9386b32
|
comment_width
will wrap comments one column early sometimescomment_width
@rustbot claim |
@IVIURRAY I think this would be a good one to get started with. The issue is that we're using the wrong |
Hey, @ytmimi, thanks for picking this one out, I've started to take a look but I'm finding it rather difficult to get the debugger working for this project. I'm obviously doing something wrong, I posted in Rust's Zulip streams, so hopefully I will get some help there. At the minute I'm spraying @rustbot claim |
Using
rustfmt 1.5.3-nightly (5ea66686 2023-06-27)
, with the following configuration options:Sometimes comments are wrapped after 119 columns instead of the 120 columns I'd expect. It also seems context dependent.
For example, both of these lines are 120 columns, and neither get wrapped.
But this comment's line is 120 columns long, and does get wrapped:
I have a little repository demonstrating this: https://github.com/InsertCreativityHere/rustfmt-comment-width-weirdness
The text was updated successfully, but these errors were encountered: