1
Fork 0

Introduce DotDotPos.

This shrinks `hir::Pat` from 88 to 72 bytes.
This commit is contained in:
Nicholas Nethercote 2022-09-01 13:29:57 +10:00
parent 4314615ff8
commit e67f39f8bc
15 changed files with 85 additions and 47 deletions

View file

@ -333,7 +333,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
&mut self,
pats: &'tcx [hir::Pat<'tcx>],
expected_len: usize,
gap_pos: Option<usize>,
gap_pos: hir::DotDotPos,
) -> Vec<FieldPat<'tcx>> {
pats.iter()
.enumerate_and_adjust(expected_len, gap_pos)