Skip to content

Reflow every doc comment to 80 columns - #54

Merged
plaidfinch merged 1 commit into
mainfrom
comment-reflow
Nov 8, 2026
Merged

plaidfinch merged 1 commit into
mainfrom
comment-reflow

Conversation

@plaidfinch

Copy link
Copy Markdown
Collaborator

Rewrap the doc comments of every crate, the detached fuzz workspace
included, so that their paragraphs fill the whole source line up to 80
columns. The rewrap is cargo doc-fmt, from the unpublished
rustdoc-fmt crate in cargo-doc-edit, run as:

cargo doc-fmt --all -- --config comment_width=80
cargo doc-fmt --all --manifest-path crates/before/fuzz/Cargo.toml \
    -- --config comment_width=80

The change is whitespace inside doc comments. No code changed: with
every comment removed, each file is byte-identical to its parent. No
word changed, except that the rewrap aligns markdown tables, padding
cells and sizing delimiter rows to the column widths, so a few table
rows grow past 80 columns. Rustdoc renders every page of rumors,
before, suanpan and rumors-tracing the same apart from
whitespace, in the public and private builds. The search index's
truncated summaries move their cut by a word in a few places: rustdoc
admits a summary's last word when a line break follows it and not when
a space does.

The doc lines still over 80 columns are table rows, fenced code, URLs,
single words too wide for their line, and doc comments inside macro
invocations such as proptest!, whose bodies the rewrap leaves alone.
fuzzfit/harness/src/bands.rs keeps its layout because
bin/calibrate writes it.

The READMEs mirror the crate docs, so just readme regenerates them.

Rewrap the doc comments of every crate, the detached fuzz workspace
included, so that their paragraphs fill the whole source line up to 80
columns. The rewrap is `cargo doc-fmt`, from the unpublished
`rustdoc-fmt` crate in cargo-doc-edit, run as:

    cargo doc-fmt --all -- --config comment_width=80
    cargo doc-fmt --all --manifest-path crates/before/fuzz/Cargo.toml \
        -- --config comment_width=80

The change is whitespace inside doc comments. No code changed: with
every comment removed, each file is byte-identical to its parent. No
word changed, except that the rewrap aligns markdown tables, padding
cells and sizing delimiter rows to the column widths, so a few table
rows grow past 80 columns. Rustdoc renders every page of `rumors`,
`before`, `suanpan` and `rumors-tracing` the same apart from
whitespace, in the public and private builds. The search index's
truncated summaries move their cut by a word in a few places: rustdoc
admits a summary's last word when a line break follows it and not when
a space does.

The doc lines still over 80 columns are table rows, fenced code, URLs,
single words too wide for their line, and doc comments inside macro
invocations such as `proptest!`, whose bodies the rewrap leaves alone.
`fuzzfit/harness/src/bands.rs` keeps its layout because
`bin/calibrate` writes it.

The READMEs mirror the crate docs, so `just readme` regenerates them.
@plaidfinch
plaidfinch merged commit 8a635dd into main Nov 8, 2026
6 checks passed
@plaidfinch
plaidfinch deleted the comment-reflow branch November 8, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant