@@ -14,7 +14,7 @@ pub fn generate_caster(ty: &impl ToTokens, trait_: &Path, sync: bool) -> TokenSt
1414 let fn_ident = format_ident ! ( "{}" , new_fn_name( & mut fn_buf) ) ;
1515 let new_caster = if sync {
1616 quote ! {
17- intertrait:: Caster :: <dyn #trait_>:: new_sync(
17+ :: intertrait:: Caster :: <dyn #trait_>:: new_sync(
1818 |from| from. downcast_ref:: <#ty>( ) . unwrap( ) ,
1919 |from| from. downcast_mut:: <#ty>( ) . unwrap( ) ,
2020 |from| from. downcast:: <#ty>( ) . unwrap( ) ,
@@ -24,7 +24,7 @@ pub fn generate_caster(ty: &impl ToTokens, trait_: &Path, sync: bool) -> TokenSt
2424 }
2525 } else {
2626 quote ! {
27- intertrait:: Caster :: <dyn #trait_>:: new(
27+ :: intertrait:: Caster :: <dyn #trait_>:: new(
2828 |from| from. downcast_ref:: <#ty>( ) . unwrap( ) ,
2929 |from| from. downcast_mut:: <#ty>( ) . unwrap( ) ,
3030 |from| from. downcast:: <#ty>( ) . unwrap( ) ,
@@ -34,9 +34,9 @@ pub fn generate_caster(ty: &impl ToTokens, trait_: &Path, sync: bool) -> TokenSt
3434 } ;
3535
3636 quote ! {
37- #[ linkme:: distributed_slice( intertrait:: CASTERS ) ]
38- fn #fn_ident( ) -> ( std:: any:: TypeId , intertrait:: BoxedCaster ) {
39- ( std:: any:: TypeId :: of:: <#ty>( ) , Box :: new( #new_caster) )
37+ #[ :: linkme:: distributed_slice( :: intertrait:: CASTERS ) ]
38+ fn #fn_ident( ) -> ( :: std:: any:: TypeId , :: intertrait:: BoxedCaster ) {
39+ ( :: std:: any:: TypeId :: of:: <#ty>( ) , Box :: new( #new_caster) )
4040 }
4141 }
4242}
0 commit comments