@@ -13,17 +13,16 @@ extern crate syn;
1313
1414use proc_macro:: TokenStream ;
1515use proc_macro2:: TokenStream as TokenStream2 ;
16- use quote:: { format_ident , quote , ToTokens } ;
16+ use quote:: { ToTokens , format_ident , quote } ;
1717use syn:: {
18- braced,
18+ AttrStyle , Attribute , Expr , FnArg , Ident , Lit , LitBool , MetaNameValue , Pat , PatType , Path ,
19+ ReturnType , Token , Type , Visibility , braced,
1920 ext:: IdentExt ,
2021 parenthesized,
2122 parse:: { Parse , ParseStream } ,
2223 parse_macro_input, parse_quote,
2324 spanned:: Spanned ,
2425 token:: Comma ,
25- AttrStyle , Attribute , Expr , FnArg , Ident , Lit , LitBool , MetaNameValue , Pat , PatType , Path ,
26- ReturnType , Token , Type , Visibility ,
2726} ;
2827
2928/// Accumulates multiple errors into a result.
@@ -339,12 +338,12 @@ impl Parse for DeriveMeta {
339338#[ proc_macro_attribute]
340339#[ cfg( feature = "serde1" ) ]
341340pub fn derive_serde ( _attr : TokenStream , item : TokenStream ) -> TokenStream {
342- let mut gen : proc_macro2:: TokenStream = quote ! {
341+ let mut derives : proc_macro2:: TokenStream = quote ! {
343342 #[ derive( :: tarpc:: serde:: Serialize , :: tarpc:: serde:: Deserialize ) ]
344343 #[ serde( crate = "::tarpc::serde" ) ]
345344 } ;
346- gen . extend ( proc_macro2:: TokenStream :: from ( item) ) ;
347- proc_macro:: TokenStream :: from ( gen )
345+ derives . extend ( proc_macro2:: TokenStream :: from ( item) ) ;
346+ proc_macro:: TokenStream :: from ( derives )
348347}
349348
350349fn collect_cfg_attrs ( rpcs : & [ RpcMethod ] ) -> Vec < Vec < & Attribute > > {
0 commit comments