Skip to content

Reapply "Initial work on formatting headers"#6457

Merged
ytmimi merged 2 commits intorust-lang:mainfrom
fee1-dead-contrib:format-header-2
Mar 20, 2026
Merged

Reapply "Initial work on formatting headers"#6457
ytmimi merged 2 commits intorust-lang:mainfrom
fee1-dead-contrib:format-header-2

Conversation

@fee1-dead
Copy link
Member

As per this comment.

This reimplements the header formatting infrastructure to resume porting to this system, if there are comments between header parts, we preserve the original whitespace/comments snippet instead of realigning/reformatting them.

This reverts commit f2c84b5.

let path = segments_iter.collect::<Vec<_>>().join("::");
let in_str = if is_keyword(&path) { "" } else { "in " };

Cow::from(format!("pub({}{})", in_str, path))
Copy link
Contributor

@ytmimi ytmimi Jan 30, 2025

Choose a reason for hiding this comment

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

Not something that we need to fix right now, but we're potentially missing comments within the visibility modifier. e.g pub( /* comment */ crate /* comment */).

@fee1-dead
Copy link
Member Author

@ytmimi I've addressed the feedback and updated the PR :)

@fee1-dead fee1-dead added S-waiting-on-review Status: awaiting review from the assignee but also interested parties. and removed pr-waiting-on-author labels Dec 27, 2025
@ytmimi
Copy link
Contributor

ytmimi commented Mar 12, 2026

@fee1-dead when you get a chance please rebase on the latest main branch.

@ytmimi ytmimi self-assigned this Mar 12, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 20, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@ytmimi ytmimi merged commit 0660429 into rust-lang:main Mar 20, 2026
26 checks passed
@rustbot rustbot added release-notes Needs an associated changelog entry and removed S-waiting-on-review Status: awaiting review from the assignee but also interested parties. labels Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes Needs an associated changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants