Doctest line numbers should be corrected to the failing line, not the start of the test
Open
@Vrajs16 is already working on this.
Since Jul 9, 2025.
A-doctests
C-bug
T-rustdoc
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
In the following test failure output, the error is on line 115, not 104. 104 is the start of the example block
running 28 tests
test ratatui-macros/src/lib.rs - (line 104) ... FAILED
...
failures:
---- ratatui-macros/src/lib.rs - (line 104) stdout ----
error: expected one of `,`, `.`, `?`, `]`, or an operator, found `;`
--> ratatui-macros/src/lib.rs:115:6
...
failures:
ratatui-macros/src/lib.rs - (line 104)
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.
Assessment
This issue has not been assessed yet.