mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-12 13:28:13 +00:00
Recognize proc macro server unexpectedly exiting and report the exit code
This commit is contained in:
parent
f5f7ddae23
commit
21a953fe37
3 changed files with 52 additions and 12 deletions
|
@ -14,8 +14,10 @@ mod version;
|
|||
use indexmap::IndexSet;
|
||||
use paths::AbsPathBuf;
|
||||
use span::Span;
|
||||
use std::{fmt, io, sync::Mutex};
|
||||
use triomphe::Arc;
|
||||
use std::{
|
||||
fmt, io,
|
||||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
@ -81,9 +83,11 @@ impl PartialEq for ProcMacro {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct ServerError {
|
||||
pub message: String,
|
||||
pub io: Option<io::Error>,
|
||||
// io::Error isn't Clone for some reason
|
||||
pub io: Option<Arc<io::Error>>,
|
||||
}
|
||||
|
||||
impl fmt::Display for ServerError {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue