Skip to content

Commit

Permalink
Add rust-mode workaround for error_stack errors (#812)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Diekmann <[email protected]>
  • Loading branch information
wildwestrom and TimDiekmann authored Jul 18, 2022
1 parent e248d06 commit b2a20ab
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/libs/error-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,17 @@ Caused by:
```

Please see the [documentation] for a full description.

## Troubleshooting

### Emacs [rust-mode](https://github.com/rust-lang/rust-mode) workaround

Due to [rust-lang/rust-mode#452](https://github.com/rust-lang/rust-mode/issues/452), errors messages are improperly parsed. As a result, the error messages show incorrect highlighting but also yield an incorrect hyperlink.

The one workaround is to modify the regular expression used to format the string and create a hyperlink.

```emacs-lisp
(setq cargo-compilation-regexps
'("\\(?:at\\|',\\) \\(\\([^:\s]+\\):\\([0-9]+\\)\\)"
2 3 nil nil 1))
```

0 comments on commit b2a20ab

Please sign in to comment.