Closed
Description
I'm not sure if this is a bug or intended behavior, but it seems like the spacing between constants is off if the constant defines a code block.
You can see this in the stdlib documentation on various types, like here on the type i32
:
In 1.65, it looked like this (link):
I can also reproduce this locally: if I run cargo doc --open
on this code:
pub struct Foo;
impl Foo {
/// ```rust
/// use bug::Foo;
/// ```
pub const BAR: u32 = 123;
pub const BAZ: u32 = 456;
pub const BAZ2: u32 = 789;
}
This happens:
The constant BAZ
has less padding than the other constants.
Meta
❯ rustc --version --verbose
rustc 1.66.0-nightly (5c8bff74b 2022-10-21)
binary: rustc
commit-hash: 5c8bff74bc1c52bef0c79f3689bb227f51f3e82d
commit-date: 2022-10-21
host: x86_64-unknown-linux-gnu
release: 1.66.0-nightly
LLVM version: 15.0.2