rust-lang / rust-lang/rust

Example file path and line overlapping with code

Open
#162,010 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug T-rustdoc
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Problematic generation

Code

const PIXEL_PERFECT_LAYERS: RenderLayers = RenderLayers::layer(0);

/// Render layers for high-resolution rendering.
const HIGH_RES_LAYERS: RenderLayers = RenderLayers::layer(1);

Expected Outcome

I would expect the file path to not hide the code. Maybe add an extra empty line below the last line from the example?

Actual Output

The end of the last line is hidden behind the file path and line number.

Image

Version

rustdoc 1.99.0-nightly (3d6c19bb9 2026-08-11)

Additional Details

N/A


If you feel this could be a good first issue, I would gladly try, if someone could give some guidelines. Cheers!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the linked rustdoc page for RenderLayers::layer and inspect how the example's file path and line number are rendered over the final code line. Identify the rustdoc rendering entry point and an existing relevant test, then confirm the fix by checking that the path and line number no longer obscure the example.

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
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.