Skip to main content

proc_macro_api/
legacy_protocol.rs

1//! The initial proc-macro-srv protocol, soon to be deprecated.
2
3pub mod msg;
4#[cfg(feature = "in-ra")]
5mod sender;
6
7#[cfg(feature = "in-ra")]
8pub(crate) use self::sender::*;
9
10/// Legacy span type, only defined here as it is still used by the proc-macro server.
11/// While rust-analyzer doesn't use this anymore at all, RustRover relies on the legacy type for
12/// proc-macro expansion.
13#[derive(Clone, Copy, PartialEq, Eq, Hash)]
14pub struct SpanId(pub u32);
15
16impl std::fmt::Debug for SpanId {
17    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18        self.0.fmt(f)
19    }
20}