Inconsistent rustdoc constant expansion from macro #115295
Labels
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: constants are formatted as either all
{ _ }
, or all42
.Instead, this happened: the one in the trait generic is formatted as the literal
42
, while everywhere else it's formatted as{ _ }
.I assume it's this:
rust/src/librustdoc/clean/utils.rs
Lines 436 to 438 in 8550f15
which can be expanded on to also format the literal if it's coming from a macro span by using the pretty printer.
Meta
rustc --version --verbose
:Backtrace
@rustbot label A-rustdoc-ui T-rustdoc
The text was updated successfully, but these errors were encountered: