mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-30 11:37:31 +00:00
Decouple proc-macro server protocol from the server implementation
This commit is contained in:
parent
90b724afad
commit
714b81bec1
17 changed files with 242 additions and 217 deletions
|
|
@ -358,6 +358,18 @@ impl HirFileId {
|
|||
}
|
||||
}
|
||||
|
||||
/// Legacy span type, only defined here as it is still used by the proc-macro server.
|
||||
/// While rust-analyzer doesn't use this anymore at all, RustRover relies on the legacy type for
|
||||
/// proc-macro expansion.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct TokenId(pub u32);
|
||||
|
||||
impl std::fmt::Debug for TokenId {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
self.0.fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "ra-salsa"))]
|
||||
mod intern_id_proxy {
|
||||
use std::fmt;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue