diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2025-04-14 04:57:34 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-14 04:57:34 +0000 |
| commit | 45be9c2e7d951159e1a8ade1f21d4fa3d2ff5628 (patch) | |
| tree | c0a3f7f3fcfc4fe44bf9cfa423950d4716e2cba6 | |
| parent | 121a12edc699b5f50a5ab4924f8db3ab1ce96b75 (diff) | |
| parent | 552020dc62f3eb8308d12ddb6b052fa7e543b254 (diff) | |
Merge pull request #19576 from chenyukang/yukang-fix-rustfmt-error
Ignore errors from rustfmt which may trigger error notification
| -rw-r--r-- | src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs index 27114fef87e..dd41991a913 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs @@ -2418,7 +2418,11 @@ fn run_rustfmt( Ok(None) } // rustfmt panicked at lexing/parsing the file - Some(101) if !rustfmt_not_installed && captured_stderr.starts_with("error[") => { + Some(101) + if !rustfmt_not_installed + && (captured_stderr.starts_with("error[") + || captured_stderr.starts_with("error:")) => + { Ok(None) } _ => { |
