mir: Use the new method for BasicBlockData
This commit is contained in:
@@ -19,11 +19,11 @@ fn mock_body<'tcx>() -> mir::Body<'tcx> {
|
||||
let mut block = |n, kind| {
|
||||
let nop = mir::Statement::new(source_info, mir::StatementKind::Nop);
|
||||
|
||||
blocks.push(mir::BasicBlockData {
|
||||
statements: std::iter::repeat(&nop).cloned().take(n).collect(),
|
||||
terminator: Some(mir::Terminator { source_info, kind }),
|
||||
is_cleanup: false,
|
||||
})
|
||||
blocks.push(mir::BasicBlockData::new_stmts(
|
||||
std::iter::repeat(&nop).cloned().take(n).collect(),
|
||||
Some(mir::Terminator { source_info, kind }),
|
||||
false,
|
||||
))
|
||||
};
|
||||
|
||||
let dummy_place = mir::Place { local: mir::RETURN_PLACE, projection: ty::List::empty() };
|
||||
|
||||
Reference in New Issue
Block a user