File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
compiler/rustc_traits/src Expand file tree Collapse file tree 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>(
275275
276276 ty:: Adt ( def, substs) => {
277277 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 ) ?;
279279 // FIXME: we can try to recursively `dtorck_constraint_on_ty`
280280 // 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) ) ) ;
284284 }
285285
286286 // Objects must be alive in order for their destructor
You can’t perform that action at this time.
0 commit comments