Remove box syntax from rustc_mir_dataflow and rustc_mir_transform
This commit is contained in:
parent
4bb4dc4672
commit
99603ef074
4 changed files with 5 additions and 6 deletions
|
@ -1,6 +1,5 @@
|
||||||
#![feature(associated_type_defaults)]
|
#![feature(associated_type_defaults)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(box_syntax)]
|
|
||||||
#![feature(exact_size_is_empty)]
|
#![feature(exact_size_is_empty)]
|
||||||
#![feature(let_else)]
|
#![feature(let_else)]
|
||||||
#![feature(min_specialization)]
|
#![feature(min_specialization)]
|
||||||
|
|
|
@ -192,12 +192,12 @@ impl<'tcx> InstCombineContext<'tcx, '_> {
|
||||||
|
|
||||||
statements.push(Statement {
|
statements.push(Statement {
|
||||||
source_info: terminator.source_info,
|
source_info: terminator.source_info,
|
||||||
kind: StatementKind::Assign(box (
|
kind: StatementKind::Assign(Box::new((
|
||||||
destination_place,
|
destination_place,
|
||||||
Rvalue::Use(Operand::Copy(
|
Rvalue::Use(Operand::Copy(
|
||||||
arg_place.project_deeper(&[ProjectionElem::Deref], self.tcx),
|
arg_place.project_deeper(&[ProjectionElem::Deref], self.tcx),
|
||||||
)),
|
)),
|
||||||
)),
|
))),
|
||||||
});
|
});
|
||||||
terminator.kind = TerminatorKind::Goto { target: destination_block };
|
terminator.kind = TerminatorKind::Goto { target: destination_block };
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#![allow(rustc::potential_query_instability)]
|
#![allow(rustc::potential_query_instability)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(box_syntax)]
|
|
||||||
#![feature(let_chains)]
|
#![feature(let_chains)]
|
||||||
#![feature(let_else)]
|
#![feature(let_else)]
|
||||||
#![feature(map_try_insert)]
|
#![feature(map_try_insert)]
|
||||||
|
|
|
@ -125,7 +125,7 @@ impl<'tcx> Patcher<'_, 'tcx> {
|
||||||
let assign_to = Place::from(local);
|
let assign_to = Place::from(local);
|
||||||
let rvalue = Rvalue::Use(operand);
|
let rvalue = Rvalue::Use(operand);
|
||||||
make_copy_statement.kind =
|
make_copy_statement.kind =
|
||||||
StatementKind::Assign(box (assign_to, rvalue));
|
StatementKind::Assign(Box::new((assign_to, rvalue)));
|
||||||
statements.push(make_copy_statement);
|
statements.push(make_copy_statement);
|
||||||
|
|
||||||
// to reorder we have to copy and make NOP
|
// to reorder we have to copy and make NOP
|
||||||
|
@ -165,7 +165,8 @@ impl<'tcx> Patcher<'_, 'tcx> {
|
||||||
if add_deref {
|
if add_deref {
|
||||||
place = self.tcx.mk_place_deref(place);
|
place = self.tcx.mk_place_deref(place);
|
||||||
}
|
}
|
||||||
len_statement.kind = StatementKind::Assign(box (*into, Rvalue::Len(place)));
|
len_statement.kind =
|
||||||
|
StatementKind::Assign(Box::new((*into, Rvalue::Len(place))));
|
||||||
statements.push(len_statement);
|
statements.push(len_statement);
|
||||||
|
|
||||||
// make temporary dead
|
// make temporary dead
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue