Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 232a4a2

Browse files
committedSep 12, 2019
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)
Please sign in to comment.