Guillaume Gomez 45fcb6fd7c
Rollup merge of #109680 - clubby789:array-subslice-2229, r=davidtwco
Fix subslice capture in closure

Fixes #109298 by refining captures in the same way for Subslices and Indexes. The comment `// we never capture this` seems to have been inaccurate, as changing it to an assert causes many test failures

`@rustbot` label +A-closures
2023-03-31 22:32:49 +02:00
..
2023-03-27 22:26:30 +01:00
2023-03-27 12:16:54 +00:00
2023-03-29 09:56:28 +08:00
2023-03-14 19:12:42 +00:00
2023-03-08 00:00:18 +00:00
2023-03-20 03:22:31 +08:00
2023-03-08 00:00:18 +00:00
2023-03-22 15:15:41 -07:00
2023-03-29 18:04:44 -04:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00