Merge pull request #18663 from Veykril/push-syoklzkntykn

fix: Swallow rustfmt parsing panics
This commit is contained in:
Lukas Wirth 2024-12-11 10:06:28 +00:00 committed by GitHub
commit e7a4c99ce3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2352,6 +2352,10 @@ fn run_rustfmt(
);
Ok(None)
}
// rustfmt panicked at lexing/parsing the file
Some(101) if !rustfmt_not_installed && captured_stderr.starts_with("error[") => {
Ok(None)
}
_ => {
// Something else happened - e.g. `rustfmt` is missing or caught a signal
Err(LspError::new(