Skip to content

Make panic! error output compatible with GCC error message #25151

Closed
@krig

Description

@krig

This is what I see right now when a test fails running cargo test:

running 1 test
test basic_conversion ... FAILED

failures:

---- basic_conversion stdout ----
    thread 'basic_conversion' panicked at 'assertion failed: &roman(2015) == "MMXIV"', src/main.rs:34

When running this for example via the emacs compile feature, if the location was printed at the start of the line instead of the end, the key bindings for jumping to the error location would work. There are numerous other tools that also understand the GCC error format.

It'd be a nice feature to reorder the output so that src/main.rs:34 appeared at the beginning of the line instead of the end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions