@@ -595,7 +595,7 @@ impl TypeFolder<'tcx> for BoundVarReplacer<'_, 'tcx> {
595
595
ty:: ReLateBound ( debruijn, br) if debruijn >= self . current_index => {
596
596
let universe = self . universe_for ( debruijn) ;
597
597
let p = ty:: PlaceholderRegion { universe, name : br. kind } ;
598
- self . mapped_regions . insert ( p. clone ( ) , br) ;
598
+ self . mapped_regions . insert ( p, br) ;
599
599
self . infcx . tcx . mk_region ( ty:: RePlaceholder ( p) )
600
600
}
601
601
_ => r,
@@ -613,7 +613,7 @@ impl TypeFolder<'tcx> for BoundVarReplacer<'_, 'tcx> {
613
613
ty:: Bound ( debruijn, bound_ty) if debruijn >= self . current_index => {
614
614
let universe = self . universe_for ( debruijn) ;
615
615
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) ;
617
617
self . infcx . tcx . mk_ty ( ty:: Placeholder ( p) )
618
618
}
619
619
_ 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> {
637
637
universe,
638
638
name : ty:: BoundConst { var : bound_const, ty } ,
639
639
} ;
640
- self . mapped_consts . insert ( p. clone ( ) , bound_const) ;
640
+ self . mapped_consts . insert ( p, bound_const) ;
641
641
self . infcx . tcx . mk_const ( ty:: Const { val : ty:: ConstKind :: Placeholder ( p) , ty } )
642
642
}
643
643
_ if ct. has_vars_bound_at_or_above ( self . current_index ) => ct. super_fold_with ( self ) ,
0 commit comments