Closed
Description
I tried this code:
pub struct MyStruct();
pub enum MyEnum {
A(),
B(u8),
}
I would expect this to be documented as-is: as tuple structs/variants with no fields. But instead, rustdoc marks them as having private fields:
pub struct MyStruct(/* private fields */);
pub enum MyEnum {
A(/* private fields */),
B(u8),
}
Enums can't even have private fields!
Named structs/variants do not have this issue.
Meta
rustdoc --version --verbose
:
rustdoc 1.76.0-nightly (2f8d81f9d 2023-11-21)
binary: rustdoc
commit-hash: 2f8d81f9dbac6b8df982199f69da04a4c8357227
commit-date: 2023-11-21
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.5