Skip to content

Commit 5abe9e6

Browse files
committed
Ignore errors from rustfmt which may trigger error notification
1 parent 8365cf8 commit 5abe9e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/rust-analyzer/src/handlers/request.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2418,7 +2418,11 @@ fn run_rustfmt(
24182418
Ok(None)
24192419
}
24202420
// rustfmt panicked at lexing/parsing the file
2421-
Some(101) if !rustfmt_not_installed && captured_stderr.starts_with("error[") => {
2421+
Some(101)
2422+
if !rustfmt_not_installed
2423+
&& (captured_stderr.starts_with("error[")
2424+
|| captured_stderr.starts_with("error:")) =>
2425+
{
24222426
Ok(None)
24232427
}
24242428
_ => {

0 commit comments

Comments
 (0)