format err
This commit is contained in:
parent
2d2c5e118a
commit
831ebfc961
1 changed files with 3 additions and 5 deletions
|
@ -142,7 +142,7 @@ impl<'tcx> MirPatch<'tcx> {
|
||||||
let mut delta = 0;
|
let mut delta = 0;
|
||||||
let mut last_bb = START_BLOCK;
|
let mut last_bb = START_BLOCK;
|
||||||
let mut terminator_targets = Vec::new();
|
let mut terminator_targets = Vec::new();
|
||||||
let mut statements:Vec<Statement<'_>> = Vec::new();
|
let mut statements: Vec<Statement<'_>> = Vec::new();
|
||||||
for (mut loc, stmt) in new_statements {
|
for (mut loc, stmt) in new_statements {
|
||||||
if loc.block != last_bb {
|
if loc.block != last_bb {
|
||||||
delta = 0;
|
delta = 0;
|
||||||
|
@ -159,7 +159,7 @@ impl<'tcx> MirPatch<'tcx> {
|
||||||
let successors = term.successors().clone();
|
let successors = term.successors().clone();
|
||||||
|
|
||||||
for i in successors {
|
for i in successors {
|
||||||
statements.push(Statement{source_info,kind:stmt.clone()});
|
statements.push(Statement { source_info, kind: stmt.clone() });
|
||||||
terminator_targets.push(i.clone());
|
terminator_targets.push(i.clone());
|
||||||
}
|
}
|
||||||
delta += 1;
|
delta += 1;
|
||||||
|
@ -174,9 +174,7 @@ impl<'tcx> MirPatch<'tcx> {
|
||||||
|
|
||||||
for target in terminator_targets.iter().rev() {
|
for target in terminator_targets.iter().rev() {
|
||||||
let stmt = statements.pop().unwrap();
|
let stmt = statements.pop().unwrap();
|
||||||
body[*target]
|
body[*target].statements.insert(0, stmt);
|
||||||
.statements
|
|
||||||
.insert(0, stmt);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue