@@ -664,7 +664,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
664664 -> RelateResult < ' tcx , Ty < ' tcx > >
665665 // FIXME(eddyb) use copyable iterators when that becomes ergonomic.
666666 where E : Fn ( ) -> I ,
667- I : IntoIterator < Item =( & ' b hir:: Expr , Ty < ' tcx > ) > {
667+ I : IntoIterator < Item =& ' b hir:: Expr > {
668668
669669 let prev_ty = self . resolve_type_vars_with_obligations ( prev_ty) ;
670670 let new_ty = self . resolve_type_vars_with_obligations ( new_ty) ;
@@ -703,7 +703,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
703703 }
704704
705705 // Reify both sides and return the reified fn pointer type.
706- for ( expr, _ ) in exprs ( ) . into_iter ( ) . chain ( Some ( ( new, new_ty ) ) ) {
706+ for expr in exprs ( ) . into_iter ( ) . chain ( Some ( new) ) {
707707 // No adjustments can produce a fn item, so this should never trip.
708708 assert ! ( !self . tables. borrow( ) . adjustments. contains_key( & expr. id) ) ;
709709 self . write_adjustment ( expr. id , AdjustReifyFnPointer ) ;
@@ -737,13 +737,13 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
737737 // Then try to coerce the previous expressions to the type of the new one.
738738 // This requires ensuring there are no coercions applied to *any* of the
739739 // previous expressions, other than noop reborrows (ignoring lifetimes).
740- for ( expr, expr_ty ) in exprs ( ) {
740+ for expr in exprs ( ) {
741741 let noop = match self . tables . borrow ( ) . adjustments . get ( & expr. id ) {
742742 Some ( & AdjustDerefRef ( AutoDerefRef {
743743 autoderefs : 1 ,
744744 autoref : Some ( AutoPtr ( _, mutbl_adj) ) ,
745745 unsize : None
746- } ) ) => match expr_ty . sty {
746+ } ) ) => match self . node_ty ( expr . id ) . sty {
747747 ty:: TyRef ( _, mt_orig) => {
748748 // Reborrow that we can safely ignore.
749749 mutbl_adj == mt_orig. mutbl
@@ -767,9 +767,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
767767 }
768768 }
769769
770- match self . commit_if_ok ( |_| apply ( & mut coerce,
771- & || exprs ( ) . into_iter ( ) . map ( |( e, _) | e) ,
772- prev_ty, new_ty) ) {
770+ match self . commit_if_ok ( |_| apply ( & mut coerce, & exprs, prev_ty, new_ty) ) {
773771 Err ( _) => {
774772 // Avoid giving strange errors on failed attempts.
775773 if let Some ( e) = first_error {
@@ -787,7 +785,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
787785 }
788786 Ok ( ( ty, adjustment) ) => {
789787 if !adjustment. is_identity ( ) {
790- for ( expr, _ ) in exprs ( ) {
788+ for expr in exprs ( ) {
791789 let previous = self . tables . borrow ( ) . adjustments . get ( & expr. id ) . cloned ( ) ;
792790 if let Some ( AdjustNeverToAny ( _) ) = previous {
793791 self . write_adjustment ( expr. id , AdjustNeverToAny ( ty) ) ;
0 commit comments