Ignored example in warning block causes the warning icon for the example to be misaligned
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Code
/// <div class="warning">
///
/// ```ignore
/// XXX
/// ```
///
/// </div>
struct X;
Reproduction Steps
cargo doc
Expected Outcome
The icon is not misaligned
Local
docs.rs
https://docs.rs/gu/latest/gu/num/traits/trait.Unsigned.html
Actual Output
The icon is misaligned
Local
doc.rs
https://docs.rs/gu/latest/gu/num/traits/trait.Unsigned.html
Version
Local
rustdoc 1.98.1 (48a229cea 2026-09-01)
docs.rs
rustdoc 1.100.0-nightly (330d31712 2026-09-17)
Firefox
155.0.1 on windows 11
Additional Details
- As seen above in the docs.rs screenshots, the contrast is bad (very under the
ayutheme) so that is another issue even if alignment is fixed - Another issue is that the icon is a link (linking to
#) when it should not be (this is true of both examples in the docs.rs link above), and specifically on docs.rs it is underlined when nested
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by running cargo doc on the warning block containing the ignored Rust example, then compare the generated output with the local and docs.rs screenshots. Trace the rustdoc-generated warning icon and example markup, and consider alignment, contrast, and the unexpected link behavior; done means the icon renders correctly without introducing these related issues.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100