mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
remove inner match
This commit is contained in:
parent
0cb22a66eb
commit
d6efedcaf5
@ -208,12 +208,10 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
|
|||||||
}
|
}
|
||||||
ProjectionElem::Index(_) => match place_ty.kind() {
|
ProjectionElem::Index(_) => match place_ty.kind() {
|
||||||
ty::Array(..) => {
|
ty::Array(..) => {
|
||||||
if let ProjectionElem::Index(..) = elem {
|
return Err(MoveError::cannot_move_out_of(
|
||||||
return Err(MoveError::cannot_move_out_of(
|
self.loc,
|
||||||
self.loc,
|
InteriorOfSliceOrArray { ty: place_ty, is_index: true },
|
||||||
InteriorOfSliceOrArray { ty: place_ty, is_index: true },
|
));
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ty::Slice(_) => {
|
ty::Slice(_) => {
|
||||||
return Err(MoveError::cannot_move_out_of(
|
return Err(MoveError::cannot_move_out_of(
|
||||||
|
Loading…
Reference in New Issue
Block a user