@@ -476,7 +476,7 @@ impl<'a, 'b> Context<'a, 'b> {
476476 match ty {
477477 Placeholder ( _) => {
478478 // record every (position, type) combination only once
479- let ref mut seen_ty = self . arg_unique_types [ arg] ;
479+ let seen_ty = & mut self . arg_unique_types [ arg] ;
480480 let i = seen_ty. iter ( ) . position ( |x| * x == ty) . unwrap_or_else ( || {
481481 let i = seen_ty. len ( ) ;
482482 seen_ty. push ( ty) ;
@@ -526,7 +526,7 @@ impl<'a, 'b> Context<'a, 'b> {
526526
527527 // Map the arguments
528528 for i in 0 ..args_len {
529- let ref arg_types = self . arg_types [ i] ;
529+ let arg_types = & self . arg_types [ i] ;
530530 let arg_offsets = arg_types. iter ( ) . map ( |offset| sofar + * offset) . collect :: < Vec < _ > > ( ) ;
531531 self . arg_index_map . push ( arg_offsets) ;
532532 sofar += self . arg_unique_types [ i] . len ( ) ;
@@ -597,7 +597,7 @@ impl<'a, 'b> Context<'a, 'b> {
597597 let arg_idx = match arg_index_consumed. get_mut ( i) {
598598 None => 0 , // error already emitted elsewhere
599599 Some ( offset) => {
600- let ref idx_map = self . arg_index_map [ i] ;
600+ let idx_map = & self . arg_index_map [ i] ;
601601 // unwrap_or branch: error already emitted elsewhere
602602 let arg_idx = * idx_map. get ( * offset) . unwrap_or ( & 0 ) ;
603603 * offset += 1 ;
@@ -721,7 +721,7 @@ impl<'a, 'b> Context<'a, 'b> {
721721 let name = names_pos[ i] ;
722722 let span = self . ecx . with_def_site_ctxt ( e. span ) ;
723723 pats. push ( self . ecx . pat_ident ( span, name) ) ;
724- for ref arg_ty in self . arg_unique_types [ i] . iter ( ) {
724+ for arg_ty in self . arg_unique_types [ i] . iter ( ) {
725725 locals. push ( Context :: format_arg ( self . ecx , self . macsp , e. span , arg_ty, name) ) ;
726726 }
727727 heads. push ( self . ecx . expr_addr_of ( e. span , e) ) ;
0 commit comments