diff options
| author | Lukas Wirth <me@lukaswirth.dev> | 2025-06-25 13:03:21 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-25 13:03:21 +0000 |
| commit | 889770abdff913aa572470160333bb3a0ffb3ed1 (patch) | |
| tree | 0d9c56e5af00520bf3edbd24c3900f5115a555e5 | |
| parent | cd4100da477d3b597ec6677a5eeaac219a667e9b (diff) | |
| parent | a12b96f3fad541c89138a7cbfe76fce437013add (diff) | |
| download | rust-889770abdff913aa572470160333bb3a0ffb3ed1.tar.gz rust-889770abdff913aa572470160333bb3a0ffb3ed1.zip | |
Merge pull request #20096 from lnicola/silence-rustfmt-failed
internal: Don't show notifications on failed rustfmt calls
| -rw-r--r-- | src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/request.rs | 19 |
1 files changed, 8 insertions, 11 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 afd9eff5264..a76a65220d3 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 @@ -2433,17 +2433,14 @@ fn run_rustfmt( } _ => { // Something else happened - e.g. `rustfmt` is missing or caught a signal - Err(LspError::new( - -32900, - format!( - r#"rustfmt exited with: - Status: {} - stdout: {captured_stdout} - stderr: {captured_stderr}"#, - output.status, - ), - ) - .into()) + tracing::error!( + ?command, + %output.status, + %captured_stdout, + %captured_stderr, + "rustfmt failed" + ); + Ok(None) } }; } |
