Closed
Description
pub struct Struct {
private: (),
}
impl Struct {
pub const CONST: Self = Struct { private: () };
}
Correct:
Incorrect:
I used the following script to bisect:
#!/bin/bash
cargo doc && ! rg private: $CARGO_TARGET_DIR/doc/repro/struct.Struct.html >/dev/null
cargo-bisect-rustc --script ./bisect.sh
It bisects to nightly-2022-04-14 and specifically #95990, of which #95316 seems the most relevant because it involves associated constants in rustdoc. @fmease @notriddle @GuillaumeGomez