Skip to content

Doctest line numbers should be corrected to the failing line, not the start of the test #142985

Open
@joshka

Description

@joshka

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-doctestsArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions