11//! A set of high-level utility fixture methods to use in tests.
2- use std:: { mem, str:: FromStr , sync:: Arc } ;
2+ use std:: { mem, str:: FromStr , sync} ;
33
44use cfg:: CfgOptions ;
55use rustc_hash:: FxHashMap ;
66use test_utils:: {
77 extract_range_or_offset, Fixture , FixtureWithProjectMeta , RangeOrOffset , CURSOR_MARKER ,
88 ESCAPED_CURSOR_MARKER ,
99} ;
10+ use triomphe:: Arc ;
1011use tt:: token_id:: { Leaf , Subtree , TokenTree } ;
1112use vfs:: { file_set:: FileSet , VfsPath } ;
1213
@@ -334,7 +335,7 @@ pub fn identity(_attr: TokenStream, item: TokenStream) -> TokenStream {
334335 ProcMacro {
335336 name : "identity" . into ( ) ,
336337 kind : crate :: ProcMacroKind :: Attr ,
337- expander : Arc :: new ( IdentityProcMacroExpander ) ,
338+ expander : sync :: Arc :: new ( IdentityProcMacroExpander ) ,
338339 } ,
339340 ) ,
340341 (
@@ -348,7 +349,7 @@ pub fn derive_identity(item: TokenStream) -> TokenStream {
348349 ProcMacro {
349350 name : "DeriveIdentity" . into ( ) ,
350351 kind : crate :: ProcMacroKind :: CustomDerive ,
351- expander : Arc :: new ( IdentityProcMacroExpander ) ,
352+ expander : sync :: Arc :: new ( IdentityProcMacroExpander ) ,
352353 } ,
353354 ) ,
354355 (
@@ -362,7 +363,7 @@ pub fn input_replace(attr: TokenStream, _item: TokenStream) -> TokenStream {
362363 ProcMacro {
363364 name : "input_replace" . into ( ) ,
364365 kind : crate :: ProcMacroKind :: Attr ,
365- expander : Arc :: new ( AttributeInputReplaceProcMacroExpander ) ,
366+ expander : sync :: Arc :: new ( AttributeInputReplaceProcMacroExpander ) ,
366367 } ,
367368 ) ,
368369 (
@@ -376,7 +377,7 @@ pub fn mirror(input: TokenStream) -> TokenStream {
376377 ProcMacro {
377378 name : "mirror" . into ( ) ,
378379 kind : crate :: ProcMacroKind :: FuncLike ,
379- expander : Arc :: new ( MirrorProcMacroExpander ) ,
380+ expander : sync :: Arc :: new ( MirrorProcMacroExpander ) ,
380381 } ,
381382 ) ,
382383 (
@@ -390,7 +391,7 @@ pub fn shorten(input: TokenStream) -> TokenStream {
390391 ProcMacro {
391392 name : "shorten" . into ( ) ,
392393 kind : crate :: ProcMacroKind :: FuncLike ,
393- expander : Arc :: new ( ShortenProcMacroExpander ) ,
394+ expander : sync :: Arc :: new ( ShortenProcMacroExpander ) ,
394395 } ,
395396 ) ,
396397 ]
0 commit comments