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
I tried this code:
I expected to see this happen:
rustdoc src/lib.rsto generate docs with the correct comments.Instead, this happened:
rustdoc src/lib.rsgenerates documentation trimming 1. Additionally it doesn't generate any summary docs forBin themod.Meta
rustc --version --verbose: