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.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/proc-macro-srv/src/tests/utils.rs b/crates/proc-macro-srv/src/tests/utils.rs index 03b1117a5b..70eff51cad 100644 --- a/crates/proc-macro-srv/src/tests/utils.rs +++ b/crates/proc-macro-srv/src/tests/utils.rs @@ -2,14 +2,14 @@ use expect_test::Expect; use proc_macro_api::msg::TokenId; -use span::{ErasedFileAstId, FileId, Span, SpanAnchor, SyntaxContextId}; +use span::{EditionedFileId, ErasedFileAstId, FileId, Span, SpanAnchor, SyntaxContextId}; 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( - mbe::parse_to_token_tree_static_span(call_site, src).unwrap(), + mbe::parse_to_token_tree_static_span(span::Edition::CURRENT, call_site, src).unwrap(), ) } @@ -19,7 +19,7 @@ fn parse_string_spanned( src: &str, ) -> crate::server_impl::TokenStream<Span> { crate::server_impl::TokenStream::with_subtree( - mbe::parse_to_token_tree(anchor, call_site, src).unwrap(), + mbe::parse_to_token_tree(span::Edition::CURRENT, anchor, call_site, src).unwrap(), ) } @@ -68,7 +68,7 @@ fn assert_expand_impl( let def_site = Span { range: TextRange::new(0.into(), 150.into()), anchor: SpanAnchor { - file_id: FileId::from_raw(41), + file_id: EditionedFileId::current_edition(FileId::from_raw(41)), ast_id: ErasedFileAstId::from_raw(From::from(1)), }, ctx: SyntaxContextId::ROOT, @@ -76,7 +76,7 @@ fn assert_expand_impl( let call_site = Span { range: TextRange::new(0.into(), 100.into()), anchor: SpanAnchor { - file_id: FileId::from_raw(42), + file_id: EditionedFileId::current_edition(FileId::from_raw(42)), ast_id: ErasedFileAstId::from_raw(From::from(2)), }, ctx: SyntaxContextId::ROOT, |