mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-18 16:20:18 +00:00
Implement proc-macro-api versioning
This commit is contained in:
parent
41a46a78f2
commit
c40b0895f0
4 changed files with 42 additions and 8 deletions
|
@ -12,16 +12,21 @@ use crate::ProcMacroKind;
|
|||
|
||||
pub use crate::msg::flat::FlatTree;
|
||||
|
||||
pub const NO_VERSION_CHECK_VERSION: u32 = 0;
|
||||
pub const API_VERSION: u32 = 1;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub enum Request {
|
||||
ListMacros { dylib_path: PathBuf },
|
||||
ExpandMacro(ExpandMacro),
|
||||
ApiVersionCheck {},
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub enum Response {
|
||||
ListMacros(Result<Vec<(String, ProcMacroKind)>, String>),
|
||||
ExpandMacro(Result<FlatTree, PanicMessage>),
|
||||
ApiVersionCheck(u32),
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue