Skip to content

Commit 99603ef

Browse files
committed
Remove box syntax from rustc_mir_dataflow and rustc_mir_transform
1 parent 4bb4dc4 commit 99603ef

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

compiler/rustc_mir_dataflow/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![feature(associated_type_defaults)]
22
#![feature(box_patterns)]
3-
#![feature(box_syntax)]
43
#![feature(exact_size_is_empty)]
54
#![feature(let_else)]
65
#![feature(min_specialization)]

compiler/rustc_mir_transform/src/instcombine.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,12 @@ impl<'tcx> InstCombineContext<'tcx, '_> {
192192

193193
statements.push(Statement {
194194
source_info: terminator.source_info,
195-
kind: StatementKind::Assign(box (
195+
kind: StatementKind::Assign(Box::new((
196196
destination_place,
197197
Rvalue::Use(Operand::Copy(
198198
arg_place.project_deeper(&[ProjectionElem::Deref], self.tcx),
199199
)),
200-
)),
200+
))),
201201
});
202202
terminator.kind = TerminatorKind::Goto { target: destination_block };
203203
}

compiler/rustc_mir_transform/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![allow(rustc::potential_query_instability)]
22
#![feature(box_patterns)]
3-
#![feature(box_syntax)]
43
#![feature(let_chains)]
54
#![feature(let_else)]
65
#![feature(map_try_insert)]

compiler/rustc_mir_transform/src/normalize_array_len.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl<'tcx> Patcher<'_, 'tcx> {
125125
let assign_to = Place::from(local);
126126
let rvalue = Rvalue::Use(operand);
127127
make_copy_statement.kind =
128-
StatementKind::Assign(box (assign_to, rvalue));
128+
StatementKind::Assign(Box::new((assign_to, rvalue)));
129129
statements.push(make_copy_statement);
130130

131131
// to reorder we have to copy and make NOP
@@ -165,7 +165,8 @@ impl<'tcx> Patcher<'_, 'tcx> {
165165
if add_deref {
166166
place = self.tcx.mk_place_deref(place);
167167
}
168-
len_statement.kind = StatementKind::Assign(box (*into, Rvalue::Len(place)));
168+
len_statement.kind =
169+
StatementKind::Assign(Box::new((*into, Rvalue::Len(place))));
169170
statements.push(len_statement);
170171

171172
// make temporary dead

0 commit comments

Comments
 (0)