Skip to content

rustdoc trims all digits except the last two in an ordered list #161144

Description

@zacknewman

I tried this code:

/// A.
pub enum A {
    /// 123.
    B,
}
/// 123.
pub struct B;

I expected to see this happen: rustdoc src/lib.rs to generate docs with the correct comments.

Instead, this happened: rustdoc src/lib.rs generates documentation trimming 1. Additionally it doesn't generate any summary docs for B in the mod.

Meta

rustc --version --verbose:

rustc 1.97.1 (8bab26f4f 2026-07-14)
binary: rustc
commit-hash: 8bab26f4f68e0e26f0bb7960be334d5b520ea452
commit-date: 2026-07-14
host: x86_64-unknown-linux-gnu
release: 1.97.1
LLVM version: 22.1.6

Metadata

Metadata

Assignees

Labels

C-discussionCategory: Discussion or questions that doesn't represent real issues.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions