Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/span/src/lib.rs')
-rw-r--r--crates/span/src/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/span/src/lib.rs b/crates/span/src/lib.rs
index 20c3b087af..8dc9573503 100644
--- a/crates/span/src/lib.rs
+++ b/crates/span/src/lib.rs
@@ -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;