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.rs23
1 files changed, 13 insertions, 10 deletions
diff --git a/crates/proc-macro-srv-cli/src/main_loop.rs b/crates/proc-macro-srv-cli/src/main_loop.rs
index 703bc965db..5533107570 100644
--- a/crates/proc-macro-srv-cli/src/main_loop.rs
+++ b/crates/proc-macro-srv-cli/src/main_loop.rs
@@ -91,9 +91,10 @@ fn run_json() -> io::Result<()> {
let mixed_site = SpanId(mixed_site as u32);
let macro_body =
- macro_body.to_subtree_unresolved::<SpanTrans>(CURRENT_API_VERSION);
- let attributes = attributes
- .map(|it| it.to_subtree_unresolved::<SpanTrans>(CURRENT_API_VERSION));
+ macro_body.to_tokenstream_unresolved::<SpanTrans>(CURRENT_API_VERSION);
+ let attributes = attributes.map(|it| {
+ it.to_tokenstream_unresolved::<SpanTrans>(CURRENT_API_VERSION)
+ });
srv.expand(
lib,
@@ -107,8 +108,9 @@ fn run_json() -> io::Result<()> {
mixed_site,
)
.map(|it| {
- msg::FlatTree::new_raw::<SpanTrans>(
- tt::SubtreeView::new(&it),
+ msg::FlatTree::from_tokenstream_raw::<SpanTrans>(
+ it,
+ call_site,
CURRENT_API_VERSION,
)
})
@@ -122,10 +124,10 @@ fn run_json() -> io::Result<()> {
let call_site = span_data_table[call_site];
let mixed_site = span_data_table[mixed_site];
- let macro_body =
- macro_body.to_subtree_resolved(CURRENT_API_VERSION, &span_data_table);
+ let macro_body = macro_body
+ .to_tokenstream_resolved(CURRENT_API_VERSION, &span_data_table);
let attributes = attributes.map(|it| {
- it.to_subtree_resolved(CURRENT_API_VERSION, &span_data_table)
+ it.to_tokenstream_resolved(CURRENT_API_VERSION, &span_data_table)
});
srv.expand(
lib,
@@ -140,9 +142,10 @@ fn run_json() -> io::Result<()> {
)
.map(|it| {
(
- msg::FlatTree::new(
- tt::SubtreeView::new(&it),
+ msg::FlatTree::from_tokenstream(
+ it,
CURRENT_API_VERSION,
+ call_site,
&mut span_data_table,
),
serialize_span_data_index_map(&span_data_table),