Closed ntBre closed 4 months ago
Great snippet, @ntBre! I was looking for someone with the same problem as me and someone from #emacs:matrix.org
led me here.
I would really appreciate any help with this!
I think I made it work by registering a new entry instead of overriding rustc
:
(defvar rustc-panics-compilation-regexps
(let
((re
"thread '[^']+' panicked at \\(\\(.*\\):\\([0-9]+\\):\\([0-9]+\\)\\)"))
(cons re '(2 3 4 nil 1))))
(add-to-list
'compilation-error-regexp-alist-alist
(cons 'rustc-panics rustc-panics-compilation-regexps))
(add-to-list 'compilation-error-regexp-alist 'rustc-panics)
Thank you for sharing your fix!
Wow, great idea! I'll give this a try tomorrow!
Thanks again, this works great! I see now that your version is like the other definitions in rust-compile.el
. There doesn't seem to be much activity here, but I think this (or something similar) should probably be included in the package if you wanted to submit a PR.
@ntBre I opened https://github.com/rust-lang/rust-mode/pull/510 and added you as a co-author (I hope that's okay).
Awesome, thank you!
I'm not totally sure this is an issue or caused by this package, per se, but I've been having issues with my compilation links to errors. As you can see in the screenshot below, the warnings are working fine, but the whole panic line is turned into a link, and, more importantly, clicking the link brings up
Find this error in (default thread 'atom_typer::tests::atomtyper' panicked at src/lib.rs
rather than taking me to the file. I thought this might have to do with the "cleaner panic messages" from Rust 1.73, but I still had a stable 1.72.1 version installed, and it had the same problem. I don't remember exactly when this stopped working, but I've just been dealing with it for a while and finally decided to ask for help.I managed to get the behavior I wanted on the error with
but that obviously ruins the matching for warnings and other kinds of errors. I would really appreciate any help with this!
I've also been trying to use
rust-ts-mode
a bit, but I don't see anything in there that should be clashing with this option. I'm happy to provide any additional information that might be needed.