Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/proc-macro-srv/src/dylib.rs')
-rw-r--r--crates/proc-macro-srv/src/dylib.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/crates/proc-macro-srv/src/dylib.rs b/crates/proc-macro-srv/src/dylib.rs
index c8513a1067..02bdcc50d3 100644
--- a/crates/proc-macro-srv/src/dylib.rs
+++ b/crates/proc-macro-srv/src/dylib.rs
@@ -12,8 +12,8 @@ use object::Object;
use paths::{Utf8Path, Utf8PathBuf};
use crate::{
- PanicMessage, ProcMacroKind, ProcMacroSrvSpan, dylib::proc_macros::ProcMacros,
- server_impl::TopSubtree,
+ PanicMessage, ProcMacroClientHandle, ProcMacroKind, ProcMacroSrvSpan,
+ dylib::proc_macros::ProcMacros, token_stream::TokenStream,
};
pub(crate) struct Expander {
@@ -37,21 +37,22 @@ impl Expander {
Ok(Expander { inner: library, modified_time })
}
- pub(crate) fn expand<S: ProcMacroSrvSpan>(
+ pub(crate) fn expand<'a, S: ProcMacroSrvSpan + 'a>(
&self,
macro_name: &str,
- macro_body: TopSubtree<S>,
- attributes: Option<TopSubtree<S>>,
+ macro_body: TokenStream<S>,
+ attribute: Option<TokenStream<S>>,
def_site: S,
call_site: S,
mixed_site: S,
- ) -> Result<TopSubtree<S>, PanicMessage>
+ callback: Option<ProcMacroClientHandle<'_>>,
+ ) -> Result<TokenStream<S>, PanicMessage>
where
- <S::Server as bridge::server::Types>::TokenStream: Default,
+ <S::Server<'a> as bridge::server::Types>::TokenStream: Default,
{
self.inner
.proc_macros
- .expand(macro_name, macro_body, attributes, def_site, call_site, mixed_site)
+ .expand(macro_name, macro_body, attribute, def_site, call_site, mixed_site, callback)
}
pub(crate) fn list_macros(&self) -> impl Iterator<Item = (&str, ProcMacroKind)> {