Skip to content

Fix comment wrapping alignment#6804

Open
Hqllow wants to merge 4 commits intorust-lang:mainfrom
Hqllow:main
Open

Fix comment wrapping alignment#6804
Hqllow wants to merge 4 commits intorust-lang:mainfrom
Hqllow:main

Conversation

@Hqllow
Copy link

@Hqllow Hqllow commented Feb 16, 2026

  • Add feature for Issue Wrapping long trailing comments #6726

  • With this change, comments that are wrapped are automatically aligned with the original comment's indentation when strict_line_comment_wrap configuration option is set to true.
    i.e:

fn foo() {
    println!("Lorem"); // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
}

gets formatted to:

fn foo() {
    println!("Lorem"); // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
                       // tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
                       // veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
                       // ea commodo consequat.
}

@rustbot rustbot added the S-waiting-on-review Status: awaiting review from the assignee but also interested parties. label Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants