File tree 1 file changed +4
-4
lines changed
compiler/rustc_traits/src
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -275,12 +275,12 @@ fn dtorck_constraint_for_ty<'tcx>(
275
275
276
276
ty:: Adt ( def, substs) => {
277
277
let DtorckConstraint { dtorck_types, outlives, overflows } =
278
- tcx. at ( span) . adt_dtorck_constraint ( def. did ) ?. clone ( ) ;
278
+ tcx. at ( span) . adt_dtorck_constraint ( def. did ) ?;
279
279
// FIXME: we can try to recursively `dtorck_constraint_on_ty`
280
280
// there, but that needs some way to handle cycles.
281
- constraints. dtorck_types . extend ( dtorck_types. subst ( tcx, substs) ) ;
282
- constraints. outlives . extend ( outlives. subst ( tcx, substs) ) ;
283
- constraints. overflows . extend ( overflows. subst ( tcx, substs) ) ;
281
+ constraints. dtorck_types . extend ( dtorck_types. iter ( ) . map ( |t| t . subst ( tcx, substs) ) ) ;
282
+ constraints. outlives . extend ( outlives. iter ( ) . map ( |t| t . subst ( tcx, substs) ) ) ;
283
+ constraints. overflows . extend ( overflows. iter ( ) . map ( |t| t . subst ( tcx, substs) ) ) ;
284
284
}
285
285
286
286
// Objects must be alive in order for their destructor
You can’t perform that action at this time.
0 commit comments