Skip to content

Display exact code block location when running doc-tests #2888

@DelevoXDG

Description

@DelevoXDG

Currently, the examples are just numbered:

            test hello_world::add (example 0) ... ok
            ...
            test hello_world::add (example 1) ... ok

We should instead aim to track and display the exact line of the code block in the source file, similar to rustdoc tests

running 4 tests
test src/lib.rs - divide (line 31) ... ignored
test src/lib.rs - add (line 12) ... FAILED
test src/lib.rs - add (line 18) ... FAILED
test src/lib.rs - add (line 6) ... ok

Continues #2473

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions