File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
monomorphize/partitioning Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ pub fn merge_codegen_units<'tcx>(
46
46
// Record that `second_smallest` now contains all the stuff that was in
47
47
// `smallest` before.
48
48
let mut consumed_cgu_names = cgu_contents. remove ( & smallest. name ( ) ) . unwrap ( ) ;
49
- cgu_contents. get_mut ( & second_smallest. name ( ) ) . unwrap ( ) . extend ( consumed_cgu_names. drain ( .. ) ) ;
49
+ cgu_contents. get_mut ( & second_smallest. name ( ) ) . unwrap ( ) . append ( & mut consumed_cgu_names) ;
50
50
51
51
debug ! (
52
52
"CodegenUnit {} merged into CodegenUnit {}" ,
Original file line number Diff line number Diff line change @@ -614,8 +614,8 @@ impl Inliner<'tcx> {
614
614
. vars_and_temps_iter ( )
615
615
. map ( |local| callee_body. local_decls [ local] . clone ( ) ) ,
616
616
) ;
617
- caller_body. source_scopes . extend ( callee_body. source_scopes . drain ( ..) ) ;
618
- caller_body. var_debug_info . extend ( callee_body. var_debug_info . drain ( .. ) ) ;
617
+ caller_body. source_scopes . extend ( & mut callee_body. source_scopes . drain ( ..) ) ;
618
+ caller_body. var_debug_info . append ( & mut callee_body. var_debug_info ) ;
619
619
caller_body. basic_blocks_mut ( ) . extend ( callee_body. basic_blocks_mut ( ) . drain ( ..) ) ;
620
620
621
621
caller_body[ callsite. block ] . terminator = Some ( Terminator {
Original file line number Diff line number Diff line change @@ -90,8 +90,8 @@ fn dropck_outlives<'tcx>(
90
90
91
91
// "outlives" represent types/regions that may be touched
92
92
// by a destructor.
93
- result. kinds . extend ( constraints. outlives . drain ( .. ) ) ;
94
- result. overflows . extend ( constraints. overflows . drain ( .. ) ) ;
93
+ result. kinds . append ( & mut constraints. outlives ) ;
94
+ result. overflows . append ( & mut constraints. overflows ) ;
95
95
96
96
// If we have even one overflow, we should stop trying to evaluate further --
97
97
// chances are, the subsequent overflows for this evaluation won't provide useful
You can’t perform that action at this time.
0 commit comments