@@ -595,7 +595,7 @@ impl TypeFolder<'tcx> for BoundVarReplacer<'_, 'tcx> {
595595 ty:: ReLateBound ( debruijn, br) if debruijn >= self . current_index => {
596596 let universe = self . universe_for ( debruijn) ;
597597 let p = ty:: PlaceholderRegion { universe, name : br. kind } ;
598- self . mapped_regions . insert ( p. clone ( ) , br) ;
598+ self . mapped_regions . insert ( p, br) ;
599599 self . infcx . tcx . mk_region ( ty:: RePlaceholder ( p) )
600600 }
601601 _ => r,
@@ -613,7 +613,7 @@ impl TypeFolder<'tcx> for BoundVarReplacer<'_, 'tcx> {
613613 ty:: Bound ( debruijn, bound_ty) if debruijn >= self . current_index => {
614614 let universe = self . universe_for ( debruijn) ;
615615 let p = ty:: PlaceholderType { universe, name : bound_ty. var } ;
616- self . mapped_types . insert ( p. clone ( ) , bound_ty) ;
616+ self . mapped_types . insert ( p, bound_ty) ;
617617 self . infcx . tcx . mk_ty ( ty:: Placeholder ( p) )
618618 }
619619 _ if t. has_vars_bound_at_or_above ( self . current_index ) => t. super_fold_with ( self ) ,
@@ -637,7 +637,7 @@ impl TypeFolder<'tcx> for BoundVarReplacer<'_, 'tcx> {
637637 universe,
638638 name : ty:: BoundConst { var : bound_const, ty } ,
639639 } ;
640- self . mapped_consts . insert ( p. clone ( ) , bound_const) ;
640+ self . mapped_consts . insert ( p, bound_const) ;
641641 self . infcx . tcx . mk_const ( ty:: Const { val : ty:: ConstKind :: Placeholder ( p) , ty } )
642642 }
643643 _ if ct. has_vars_bound_at_or_above ( self . current_index ) => ct. super_fold_with ( self ) ,
0 commit comments