Skip to content

Commit 21351d9

Browse files
authored
Merge pull request #19576 from chenyukang/yukang-fix-rustfmt-error
Ignore errors from rustfmt which may trigger error notification
2 parents 8365cf8 + 5abe9e6 commit 21351d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: crates/rust-analyzer/src/handlers/request.rs

+5-1
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)