Skip to content

Commit ab729fb

Browse files
Rollup merge of #44362 - oli-obk:patch-7, r=eddyb
Fix a bug in the inliner r? @eddyb
2 parents 7232d12 + 5bb870f commit ab729fb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/librustc_mir/transform/inline.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -606,14 +606,20 @@ impl<'a, 'tcx> MutVisitor<'tcx> for Integrator<'a, 'tcx> {
606606
_location: Location) {
607607
if *local == RETURN_POINTER {
608608
match self.destination {
609-
Lvalue::Local(l) => *local = l,
609+
Lvalue::Local(l) => {
610+
*local = l;
611+
return;
612+
},
610613
ref lval => bug!("Return lvalue is {:?}, not local", lval)
611614
}
612615
}
613616
let idx = local.index() - 1;
614617
if idx < self.args.len() {
615618
match self.args[idx] {
616-
Operand::Consume(Lvalue::Local(l)) => *local = l,
619+
Operand::Consume(Lvalue::Local(l)) => {
620+
*local = l;
621+
return;
622+
},
617623
ref op => bug!("Arg operand `{:?}` is {:?}, not local", idx, op)
618624
}
619625
}

0 commit comments

Comments
 (0)