Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/proc-macro-srv-cli/src/main_loop.rs')
-rw-r--r--crates/proc-macro-srv-cli/src/main_loop.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/proc-macro-srv-cli/src/main_loop.rs b/crates/proc-macro-srv-cli/src/main_loop.rs
index a5bf84df04..4891e07314 100644
--- a/crates/proc-macro-srv-cli/src/main_loop.rs
+++ b/crates/proc-macro-srv-cli/src/main_loop.rs
@@ -6,7 +6,6 @@ use proc_macro_api::{
transport::codec::{json::JsonProtocol, postcard::PostcardProtocol},
version::CURRENT_API_VERSION,
};
-use span::Span;
use std::io;
use legacy::Message;
@@ -186,8 +185,8 @@ impl<'a, C: Codec> ProcMacroClientHandle<'a, C> {
}
impl<C: Codec> proc_macro_srv::ProcMacroClientInterface for ProcMacroClientHandle<'_, C> {
- fn file(&mut self, span: Span) -> String {
- match self.roundtrip(bidirectional::SubRequest::FilePath { span }) {
+ fn file(&mut self, file_id: u32) -> String {
+ match self.roundtrip(bidirectional::SubRequest::FilePath { file_id }) {
Some(bidirectional::BidirectionalMessage::SubResponse(
bidirectional::SubResponse::FilePathResult { name },
)) => name,
@@ -195,8 +194,9 @@ impl<C: Codec> proc_macro_srv::ProcMacroClientInterface for ProcMacroClientHandl
}
}
- fn source_text(&mut self, span: Span) -> Option<String> {
- match self.roundtrip(bidirectional::SubRequest::SourceText { span }) {
+ fn source_text(&mut self, file_id: u32, ast_id: u32, start: u32, end: u32) -> Option<String> {
+ match self.roundtrip(bidirectional::SubRequest::SourceText { file_id, ast_id, start, end })
+ {
Some(bidirectional::BidirectionalMessage::SubResponse(
bidirectional::SubResponse::SourceTextResult { text },
)) => text,
@@ -204,8 +204,8 @@ impl<C: Codec> proc_macro_srv::ProcMacroClientInterface for ProcMacroClientHandl
}
}
- fn local_file(&mut self, span: Span) -> Option<String> {
- match self.roundtrip(bidirectional::SubRequest::LocalFilePath { span }) {
+ fn local_file(&mut self, file_id: u32) -> Option<String> {
+ match self.roundtrip(bidirectional::SubRequest::LocalFilePath { file_id }) {
Some(bidirectional::BidirectionalMessage::SubResponse(
bidirectional::SubResponse::LocalFilePathResult { name },
)) => name,