Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/proc-macro-srv/src/tests/utils.rs')
-rw-r--r--crates/proc-macro-srv/src/tests/utils.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/crates/proc-macro-srv/src/tests/utils.rs b/crates/proc-macro-srv/src/tests/utils.rs
index 4b8ea10ebc..37d51050f3 100644
--- a/crates/proc-macro-srv/src/tests/utils.rs
+++ b/crates/proc-macro-srv/src/tests/utils.rs
@@ -7,10 +7,12 @@ use tt::TextRange;
use crate::{dylib, proc_macro_test_dylib_path, EnvSnapshot, ProcMacroSrv};
fn parse_string(call_site: TokenId, src: &str) -> crate::server_impl::TokenStream<TokenId> {
- crate::server_impl::TokenStream::with_subtree(
+ crate::server_impl::TokenStream::with_subtree(crate::server_impl::TopSubtree(
syntax_bridge::parse_to_token_tree_static_span(span::Edition::CURRENT, call_site, src)
- .unwrap(),
- )
+ .unwrap()
+ .0
+ .into_vec(),
+ ))
}
fn parse_string_spanned(
@@ -18,9 +20,12 @@ fn parse_string_spanned(
call_site: SyntaxContextId,
src: &str,
) -> crate::server_impl::TokenStream<Span> {
- crate::server_impl::TokenStream::with_subtree(
- syntax_bridge::parse_to_token_tree(span::Edition::CURRENT, anchor, call_site, src).unwrap(),
- )
+ crate::server_impl::TokenStream::with_subtree(crate::server_impl::TopSubtree(
+ syntax_bridge::parse_to_token_tree(span::Edition::CURRENT, anchor, call_site, src)
+ .unwrap()
+ .0
+ .into_vec(),
+ ))
}
pub fn assert_expand(macro_name: &str, ra_fixture: &str, expect: Expect, expect_s: Expect) {