Destructure instead of using split_at
This commit is contained in:
parent
9c0bbe09e9
commit
232a4a2881
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user