Destructure instead of using split_at

This commit is contained in:
Santiago Pastorino 2019-09-12 16:03:38 -03:00
parent 9c0bbe09e9
commit 232a4a2881
No known key found for this signature in database
GPG Key ID: 88C941CDA1D46432

View File

@ -45,7 +45,7 @@ impl<'tcx> MutVisitor<'tcx> for InstCombineVisitor<'tcx> {
ref mut base, ref mut base,
projection: ref mut projection @ box [.., _], 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 { let place = Place {
// Replace with dummy // Replace with dummy