mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
Merge pull request #18663 from Veykril/push-syoklzkntykn
fix: Swallow rustfmt parsing panics
This commit is contained in:
commit
e7a4c99ce3
1 changed files with 4 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue