remove inner match
This commit is contained in:
parent
0cb22a66eb
commit
d6efedcaf5
@ -208,12 +208,10 @@ fn move_path_for(&mut self, place: Place<'tcx>) -> Result<MovePathIndex, MoveErr
|
||||
}
|
||||
ProjectionElem::Index(_) => match place_ty.kind() {
|
||||
ty::Array(..) => {
|
||||
if let ProjectionElem::Index(..) = elem {
|
||||
return Err(MoveError::cannot_move_out_of(
|
||||
self.loc,
|
||||
InteriorOfSliceOrArray { ty: place_ty, is_index: true },
|
||||
));
|
||||
}
|
||||
return Err(MoveError::cannot_move_out_of(
|
||||
self.loc,
|
||||
InteriorOfSliceOrArray { ty: place_ty, is_index: true },
|
||||
));
|
||||
}
|
||||
ty::Slice(_) => {
|
||||
return Err(MoveError::cannot_move_out_of(
|
||||
|
Loading…
Reference in New Issue
Block a user