Skip to content

Commit 14655a6

Browse files
arielb1Mark-Simulacrum
authored andcommitted
use the adjusted type for cat_pattern in tuple patterns
This looks like a typo introduced in #51686. Fixes #52213.
1 parent 5f2b325 commit 14655a6

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
@@ -1325,7 +1325,7 @@ impl<'a, 'gcx, 'tcx> MemCategorizationContext<'a, 'gcx, 'tcx> {
13251325
ref ty => span_bug!(pat.span, "tuple pattern unexpected type {:?}", ty),
13261326
};
13271327
for (i, subpat) in subpats.iter().enumerate_and_adjust(expected_len, ddpos) {
1328-
let subpat_ty = self.pat_ty_unadjusted(&subpat)?; // see (*2)
1328+
let subpat_ty = self.pat_ty_adjusted(&subpat)?; // see (*2)
13291329
let interior = InteriorField(FieldIndex(i, Name::intern(&i.to_string())));
13301330
let subcmt = Rc::new(self.cat_imm_interior(pat, cmt.clone(), subpat_ty, interior));
13311331
self.cat_pattern_(subcmt, &subpat, op)?;

0 commit comments

Comments
 (0)