rust-lang / rust-lang/rust-mode
rustfmt should display errors
Nobody has claimed this yet.
- Dominant language
- Emacs Lisp
- Stars
- 1.3k
- Forks
- 198
- PR merge metrics
- No merged PRs in 30d
Description
If you run rustfmt and it errors out, it currently just "beeps" and suggests you switch over to *rustfmt*. I think this should be treated like a failed compilation; we should split the frame into two windows, show the errors, and let you use M-x next-error to view them.
Example 1, which errors because it doesn't parse:
fn main() {
let x &'static str = "aaa";
}
Example 2, undefined module:
mod a;
fn main() {
let x: &'static str = "aaa";
}
Example 3, long lines:
fn main() {
let x:
&'static str = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how rustfmt errors are currently reported and how the rustfmt buffer is opened. Compare the requested behavior with Emacs's M-x next-error workflow, using the three Rust examples to check parse errors, undefined modules, and long-line errors. Done means errors are shown in a split frame and can be navigated with M-x next-error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- emacs-lisp, rust
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100