Use zip_eq to enforce that things being zipped have equal sizes

This commit is contained in:
Michael Goulet
2024-01-14 20:01:12 +00:00
parent c5cb87cf0c
commit c811662fb0
11 changed files with 33 additions and 10 deletions

View File

@@ -836,7 +836,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
self.upvars = tcx
.closure_captures(self.def_id)
.iter()
.zip(capture_tys)
.zip_eq(capture_tys)
.enumerate()
.map(|(i, (captured_place, ty))| {
let name = captured_place.to_symbol();