diff --git a/src/librustc_mir/transform/instcombine.rs b/src/librustc_mir/transform/instcombine.rs index 2b8e66e3dec..da91a8daca3 100644 --- a/src/librustc_mir/transform/instcombine.rs +++ b/src/librustc_mir/transform/instcombine.rs @@ -45,7 +45,7 @@ impl<'tcx> MutVisitor<'tcx> for InstCombineVisitor<'tcx> { ref mut base, projection: ref mut projection @ box [.., _], }) => { - let (proj_l, proj_r) = projection.split_at(projection.len() - 1); + let [proj_l @ .., proj_r] = projection; let place = Place { // Replace with dummy