Skip to content

Commit 232a4a2

Browse files
committed
Destructure instead of using split_at
1 parent 9c0bbe0 commit 232a4a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir/transform/instcombine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl<'tcx> MutVisitor<'tcx> for InstCombineVisitor<'tcx> {
4545
ref mut base,
4646
projection: ref mut projection @ box [.., _],
4747
}) => {
48-
let (proj_l, proj_r) = projection.split_at(projection.len() - 1);
48+
let [proj_l @ .., proj_r] = projection;
4949

5050
let place = Place {
5151
// Replace with dummy

0 commit comments

Comments
 (0)