diff options
| author | yukang <moorekang@gmail.com> | 2025-04-14 09:33:38 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2025-04-14 09:33:38 +0800 |
| commit | 552020dc62f3eb8308d12ddb6b052fa7e543b254 (patch) | |
| tree | c0a3f7f3fcfc4fe44bf9cfa423950d4716e2cba6 /src/tools | |
| parent | 121a12edc699b5f50a5ab4924f8db3ab1ce96b75 (diff) | |
| download | rust-552020dc62f3eb8308d12ddb6b052fa7e543b254.tar.gz rust-552020dc62f3eb8308d12ddb6b052fa7e543b254.zip | |
Ignore errors from rustfmt which may trigger error notification
Diffstat (limited to 'src/tools')
| -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) } _ => { |
