mir: Add a new method to statement
Avoid introducing a large number of changes when adding optional initialization fields.
This commit is contained in:
parent
5ca574e85b
commit
9f9cd5e283
30 changed files with 295 additions and 330 deletions
|
|
@ -17,7 +17,7 @@ fn mock_body<'tcx>() -> mir::Body<'tcx> {
|
|||
|
||||
let mut blocks = IndexVec::new();
|
||||
let mut block = |n, kind| {
|
||||
let nop = mir::Statement { source_info, kind: mir::StatementKind::Nop };
|
||||
let nop = mir::Statement::new(source_info, mir::StatementKind::Nop);
|
||||
|
||||
blocks.push(mir::BasicBlockData {
|
||||
statements: std::iter::repeat(&nop).cloned().take(n).collect(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue