Skip to content

Misc. fmt_type cleanups#157584

Open
yotamofek wants to merge 1 commit into
rust-lang:mainfrom
yotamofek:pr/rustdoc/misc-fmt_type-cleanups
Open

Misc. fmt_type cleanups#157584
yotamofek wants to merge 1 commit into
rust-lang:mainfrom
yotamofek:pr/rustdoc/misc-fmt_type-cleanups

Conversation

@yotamofek

Copy link
Copy Markdown
Contributor

r? @GuillaumeGomez if you want it :)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jun 7, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member

I gladly take it, nice improvement! r=me once CI pass.

@rust-log-analyzer

This comment has been minimized.

Comment thread src/librustdoc/html/format.rs Outdated
}
clean::ImplTrait(ref bounds) if bounds.len() > 1 => true,
let needs_parens = match ty {
clean::DynTrait(bounds, Some(_)) if bounds.len() > 1 => true,

@fmease fmease Jun 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not equivalent to what was there before. It's now bounds.len() > 1 && trait_lt.is_some() essentially whereas before it was bounds.len() > 1 || trait_lt.is_some()

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep, thanks!
(That, and a few other places where turning a x.fmt(f) into a write!(f, "{}", x) caused the alternate-ness to be lost)

@yotamofek yotamofek force-pushed the pr/rustdoc/misc-fmt_type-cleanups branch from b414dae to 17eddd4 Compare June 8, 2026 16:48
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants