mir: Use the new method for BasicBlockData
This commit is contained in:
@@ -235,11 +235,11 @@ fn split_block(
|
||||
let block_data = &mut basic_blocks[location.block];
|
||||
|
||||
// Drain every statement after this one and move the current terminator to a new basic block.
|
||||
let new_block = BasicBlockData {
|
||||
statements: block_data.statements.split_off(location.statement_index),
|
||||
terminator: block_data.terminator.take(),
|
||||
is_cleanup: block_data.is_cleanup,
|
||||
};
|
||||
let new_block = BasicBlockData::new_stmts(
|
||||
block_data.statements.split_off(location.statement_index),
|
||||
block_data.terminator.take(),
|
||||
block_data.is_cleanup,
|
||||
);
|
||||
|
||||
basic_blocks.push(new_block)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user