Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
krig opened this issue May 6, 2015 · 2 comments
Closed

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

krig opened this issue May 6, 2015 · 2 comments
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@krig
Copy link

krig commented May 6, 2015

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.

krig added a commit to krig/rust that referenced this issue May 6, 2015
Reorders the output of thread error messages so that
the file:line location appears first on the line.

For example, this goes from

        thread 'test_fails' panicked at 'assertion failed: 0 == 1', src/main.rs:34

to

        src/main.rs:34: thread 'test_fails' panicked at 'assertion failed: 0 == 1'

Fixes: rust-lang#25151
@steveklabnik steveklabnik added A-frontend Area: Compiler frontend (errors, parsing and HIR) C-enhancement Category: An issue proposing an enhancement or a PR with one. labels May 7, 2015
@steveklabnik
Copy link
Member

Triage: #25152 was closed in favor of rust-lang/rfcs#1100, which ended up closed. However, it was closed in order to merge rust-lang/rfcs#1328, which is being tracked at #30449. Which is closed because it's been implemented.

So, it seems like all of the prerequisite work is done here.

@krig
Copy link
Author

krig commented Nov 30, 2016

Oops, I forgot to close this when creating #25152. Closing, thank you.

@krig krig closed this as completed Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants