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
|
|
@ -259,13 +259,13 @@ fn remap_mir_for_const_eval_select<'tcx>(
|
|||
// (const generic stuff) so we just create a temporary and deconstruct
|
||||
// that.
|
||||
let local = body.local_decls.push(LocalDecl::new(ty, fn_span));
|
||||
bb.statements.push(Statement {
|
||||
source_info: SourceInfo::outermost(fn_span),
|
||||
kind: StatementKind::Assign(Box::new((
|
||||
bb.statements.push(Statement::new(
|
||||
SourceInfo::outermost(fn_span),
|
||||
StatementKind::Assign(Box::new((
|
||||
local.into(),
|
||||
Rvalue::Use(tupled_args.node.clone()),
|
||||
))),
|
||||
});
|
||||
));
|
||||
(Operand::Move, local.into())
|
||||
}
|
||||
Operand::Move(place) => (Operand::Move, place),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue