mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
internal: cleanup proc macro server error handlig
When dealing with proc macros, there are two very different kinds of errors: * first, usual errors of "proc macro panicked on this particular input" * second, the proc macro server might day if the user, eg, kills it First kind of errors are expected and are a normal output, while the second kind are genuine IO-errors. For this reason, we use a curious nested result here: `Result<Result<T, E1>, E2>` pattern, which is 100% inspired by http://sled.rs/errors.html
This commit is contained in:
parent
722a2a4690
commit
d8a3d6f378
12 changed files with 242 additions and 271 deletions
|
@ -7,8 +7,8 @@ mod proc_macro;
|
|||
#[allow(dead_code)]
|
||||
#[doc(hidden)]
|
||||
mod rustc_server;
|
||||
use libloading::Library;
|
||||
|
||||
use libloading::Library;
|
||||
use proc_macro_api::ProcMacroKind;
|
||||
|
||||
use super::PanicMessage;
|
||||
|
|
|
@ -7,8 +7,8 @@ mod proc_macro;
|
|||
#[allow(dead_code)]
|
||||
#[doc(hidden)]
|
||||
mod rustc_server;
|
||||
use libloading::Library;
|
||||
|
||||
use libloading::Library;
|
||||
use proc_macro_api::ProcMacroKind;
|
||||
|
||||
use super::PanicMessage;
|
||||
|
|
|
@ -7,8 +7,8 @@ mod proc_macro;
|
|||
#[allow(dead_code)]
|
||||
#[doc(hidden)]
|
||||
mod rustc_server;
|
||||
use libloading::Library;
|
||||
|
||||
use libloading::Library;
|
||||
use proc_macro_api::ProcMacroKind;
|
||||
|
||||
use super::PanicMessage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue