use the adjusted type for cat_pattern in tuple patterns
This looks like a typo introduced in #51686. Fixes #52213.
This commit is contained in:
parent
c6807bb1b2
commit
05d6e55fab
1 changed files with 1 additions and 1 deletions
|
|
@ -1347,7 +1347,7 @@ impl<'a, 'gcx, 'tcx> MemCategorizationContext<'a, 'gcx, 'tcx> {
|
|||
ref ty => span_bug!(pat.span, "tuple pattern unexpected type {:?}", ty),
|
||||
};
|
||||
for (i, subpat) in subpats.iter().enumerate_and_adjust(expected_len, ddpos) {
|
||||
let subpat_ty = self.pat_ty_unadjusted(&subpat)?; // see (*2)
|
||||
let subpat_ty = self.pat_ty_adjusted(&subpat)?; // see (*2)
|
||||
let interior = InteriorField(FieldIndex(i, Name::intern(&i.to_string())));
|
||||
let subcmt = Rc::new(self.cat_imm_interior(pat, cmt.clone(), subpat_ty, interior));
|
||||
self.cat_pattern_(subcmt, &subpat, op)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue