@@ -83,7 +83,8 @@ fn gen_clone_impl(adt: &ast::Adt, func: &ast::Fn) -> Option<()> {
8383 }
8484 let pat = make:: tuple_struct_pat ( variant_name. clone ( ) , pats. into_iter ( ) ) ;
8585 let struct_name = make:: expr_path ( variant_name) ;
86- let tuple_expr = make:: expr_call ( struct_name, make:: arg_list ( fields) ) ;
86+ let tuple_expr =
87+ make:: expr_call ( struct_name, make:: arg_list ( fields) ) . into ( ) ;
8788 arms. push ( make:: match_arm ( pat. into ( ) , None , tuple_expr) ) ;
8889 }
8990
@@ -126,7 +127,7 @@ fn gen_clone_impl(adt: &ast::Adt, func: &ast::Fn) -> Option<()> {
126127 fields. push ( gen_clone_call ( target) ) ;
127128 }
128129 let struct_name = make:: expr_path ( make:: ext:: ident_path ( "Self" ) ) ;
129- make:: expr_call ( struct_name, make:: arg_list ( fields) )
130+ make:: expr_call ( struct_name, make:: arg_list ( fields) ) . into ( )
130131 }
131132 // => Self { }
132133 None => {
@@ -303,7 +304,7 @@ fn gen_debug_impl(adt: &ast::Adt, func: &ast::Fn) -> Option<()> {
303304fn gen_default_impl ( adt : & ast:: Adt , func : & ast:: Fn ) -> Option < ( ) > {
304305 fn gen_default_call ( ) -> Option < ast:: Expr > {
305306 let fn_name = make:: ext:: path_from_idents ( [ "Default" , "default" ] ) ?;
306- Some ( make:: expr_call ( make:: expr_path ( fn_name) , make:: arg_list ( None ) ) )
307+ Some ( make:: expr_call ( make:: expr_path ( fn_name) , make:: arg_list ( None ) ) . into ( ) )
307308 }
308309 match adt {
309310 // `Debug` cannot be derived for unions, so no default impl can be provided.
@@ -330,7 +331,7 @@ fn gen_default_impl(adt: &ast::Adt, func: &ast::Fn) -> Option<()> {
330331 . fields ( )
331332 . map ( |_| gen_default_call ( ) )
332333 . collect :: < Option < Vec < ast:: Expr > > > ( ) ?;
333- make:: expr_call ( struct_name, make:: arg_list ( fields) )
334+ make:: expr_call ( struct_name, make:: arg_list ( fields) ) . into ( )
334335 }
335336 None => {
336337 let struct_name = make:: ext:: ident_path ( "Self" ) ;
@@ -364,7 +365,7 @@ fn gen_hash_impl(adt: &ast::Adt, func: &ast::Fn) -> Option<()> {
364365 let fn_name = make_discriminant ( ) ?;
365366
366367 let arg = make:: expr_path ( make:: ext:: ident_path ( "self" ) ) ;
367- let fn_call = make:: expr_call ( fn_name, make:: arg_list ( Some ( arg) ) ) ;
368+ let fn_call = make:: expr_call ( fn_name, make:: arg_list ( Some ( arg) ) ) . into ( ) ;
368369 let stmt = gen_hash_call ( fn_call) ;
369370
370371 make:: block_expr ( Some ( stmt) , None ) . indent ( ast:: edit:: IndentLevel ( 1 ) )
@@ -447,9 +448,11 @@ fn gen_partial_eq(adt: &ast::Adt, func: &ast::Fn, trait_ref: Option<TraitRef>) -
447448 ast:: Adt :: Enum ( enum_) => {
448449 // => std::mem::discriminant(self) == std::mem::discriminant(other)
449450 let lhs_name = make:: expr_path ( make:: ext:: ident_path ( "self" ) ) ;
450- let lhs = make:: expr_call ( make_discriminant ( ) ?, make:: arg_list ( Some ( lhs_name. clone ( ) ) ) ) ;
451+ let lhs = make:: expr_call ( make_discriminant ( ) ?, make:: arg_list ( Some ( lhs_name. clone ( ) ) ) )
452+ . into ( ) ;
451453 let rhs_name = make:: expr_path ( make:: ext:: ident_path ( "other" ) ) ;
452- let rhs = make:: expr_call ( make_discriminant ( ) ?, make:: arg_list ( Some ( rhs_name. clone ( ) ) ) ) ;
454+ let rhs = make:: expr_call ( make_discriminant ( ) ?, make:: arg_list ( Some ( rhs_name. clone ( ) ) ) )
455+ . into ( ) ;
453456 let eq_check =
454457 make:: expr_bin_op ( lhs, BinaryOp :: CmpOp ( CmpOp :: Eq { negated : false } ) , rhs) ;
455458
0 commit comments