Skip to content

Commit 05d6e55

Browse files
committed
use the adjusted type for cat_pattern in tuple patterns
This looks like a typo introduced in #51686. Fixes #52213.
1 parent c6807bb commit 05d6e55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/mem_categorization.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ impl<'a, 'gcx, 'tcx> MemCategorizationContext<'a, 'gcx, 'tcx> {
13471347
ref ty => span_bug!(pat.span, "tuple pattern unexpected type {:?}", ty),
13481348
};
13491349
for (i, subpat) in subpats.iter().enumerate_and_adjust(expected_len, ddpos) {
1350-
let subpat_ty = self.pat_ty_unadjusted(&subpat)?; // see (*2)
1350+
let subpat_ty = self.pat_ty_adjusted(&subpat)?; // see (*2)
13511351
let interior = InteriorField(FieldIndex(i, Name::intern(&i.to_string())));
13521352
let subcmt = Rc::new(self.cat_imm_interior(pat, cmt.clone(), subpat_ty, interior));
13531353
self.cat_pattern_(subcmt, &subpat, op)?;

0 commit comments

Comments
 (0)