We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5026465 commit 9c3a46eCopy full SHA for 9c3a46e
compiler/rustc_mir_build/src/builder/matches/match_pair.rs
@@ -157,23 +157,15 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
157
elem_ty: Ty<'tcx>,
158
) -> MatchPairTree<'pat, 'tcx> {
159
let tcx = self.tcx;
160
- let (const_ty, pat_ty) = match src_pat_ty.kind() {
161
- ty::Slice(_) => (
162
- Ty::new_imm_ref(
163
- tcx,
164
- tcx.lifetimes.re_erased,
165
- Ty::new_array(tcx, elem_ty, subslice_len),
166
- ),
167
- Ty::new_slice(tcx, elem_ty),
168
169
- ty::Array(_, _) => (
170
171
172
173
174
175
176
+ let const_ty = Ty::new_imm_ref(
+ tcx,
+ tcx.lifetimes.re_erased,
+ Ty::new_array(tcx, elem_ty, subslice_len),
+ );
+
+ let pat_ty = match src_pat_ty.kind() {
+ ty::Slice(_) => Ty::new_slice(tcx, elem_ty),
+ ty::Array(_, _) => Ty::new_array(tcx, elem_ty, subslice_len),
177
_ => unreachable!(),
178
};
179
0 commit comments