File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
compiler/rustc_mir_transform/src Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -616,7 +616,9 @@ impl<'tcx> Inliner<'tcx> {
616616 // If there are any locals without storage markers, give them storage only for the
617617 // duration of the call.
618618 for local in callee_body. vars_and_temps_iter ( ) {
619- if integrator. always_live_locals . contains ( local) {
619+ if !callee_body. local_decls [ local] . internal
620+ && integrator. always_live_locals . contains ( local)
621+ {
620622 let new_local = integrator. map_local ( local) ;
621623 caller_body[ callsite. block ] . statements . push ( Statement {
622624 source_info : callsite. source_info ,
@@ -629,7 +631,9 @@ impl<'tcx> Inliner<'tcx> {
629631 // the slice once.
630632 let mut n = 0 ;
631633 for local in callee_body. vars_and_temps_iter ( ) . rev ( ) {
632- if integrator. always_live_locals . contains ( local) {
634+ if !callee_body. local_decls [ local] . internal
635+ && integrator. always_live_locals . contains ( local)
636+ {
633637 let new_local = integrator. map_local ( local) ;
634638 caller_body[ block] . statements . push ( Statement {
635639 source_info : callsite. source_info ,
You can’t perform that action at this time.
0 commit comments