diff options
| author | ouz-a <ouz.agz@gmail.com> | 2023-09-22 11:21:55 +0300 |
|---|---|---|
| committer | ouz-a <ouz.agz@gmail.com> | 2023-09-22 11:21:55 +0300 |
| commit | d6efedcaf578e67f07293349d2128c06043a239f (patch) | |
| tree | 0247fa7de321435ca21dbacc6f8461c348fd9896 | |
| parent | 0cb22a66eb577254b8a507ef75b7f10728b396ca (diff) | |
| download | rust-d6efedcaf578e67f07293349d2128c06043a239f.tar.gz rust-d6efedcaf578e67f07293349d2128c06043a239f.zip | |
remove inner match
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/move_paths/builder.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs index 31efa26a6aa..d19b1a902f4 100644 --- a/compiler/rustc_mir_dataflow/src/move_paths/builder.rs +++ b/compiler/rustc_mir_dataflow/src/move_paths/builder.rs @@ -208,12 +208,10 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> { } 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( |
