Skip to content

Commit d6efedc

Browse files
committed
remove inner match
1 parent 0cb22a6 commit d6efedc

File tree

1 file changed

+4
-6
lines changed
  • compiler/rustc_mir_dataflow/src/move_paths

1 file changed

+4
-6
lines changed

compiler/rustc_mir_dataflow/src/move_paths/builder.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,10 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
208208
}
209209
ProjectionElem::Index(_) => match place_ty.kind() {
210210
ty::Array(..) => {
211-
if let ProjectionElem::Index(..) = elem {
212-
return Err(MoveError::cannot_move_out_of(
213-
self.loc,
214-
InteriorOfSliceOrArray { ty: place_ty, is_index: true },
215-
));
216-
}
211+
return Err(MoveError::cannot_move_out_of(
212+
self.loc,
213+
InteriorOfSliceOrArray { ty: place_ty, is_index: true },
214+
));
217215
}
218216
ty::Slice(_) => {
219217
return Err(MoveError::cannot_move_out_of(

0 commit comments

Comments
 (0)