Commit Graph

13 Commits

Author SHA1 Message Date
Jason Newcomb
52694034ba Add copy_within to IndexSlice 2025-04-15 10:44:28 -04:00
Matthias Krüger
2bdb10f164
Rollup merge of #138372 - Eclips4:issue-138196, r=scottmcm
Refactor `pick2_mut` & `pick3_mut` to use `get_disjoint_mut`

Closes #138196
2025-03-12 08:06:50 +01:00
Kirill Podoprigora
7398b39a0b Make panic's more specific 2025-03-12 00:35:16 +02:00
Kirill Podoprigora
64d143326f Refactor pick2_mut & pick3_mut to use get_disjoint_mut 2025-03-11 22:57:01 +02:00
Jason Newcomb
da0fbc19a5 Allow the optimizer to elide bounds checks when enumerating IndexSlice/IndecVec. 2025-02-28 09:10:09 -05:00
Jacob Pratt
6aa015ae9d
Rollup merge of #136610 - Jarcho:range_idx, r=Noratrieb
Allow `IndexSlice` to be indexed by ranges.

This comes with some annoyances as the index type can no longer inferred from indexing expressions. The biggest offender for this is `IndexVec::from_fn_n(|idx| ..., n)` where the index type won't be inferred from the call site or any index expressions inside the closure.

My main use case for this is mapping a `Place` to `Range<Idx>` for value tracking where the range represents all the values the place contains.
2025-02-24 02:11:32 -05:00
Michael Goulet
12e3911d81 Greatly simplify lifetime captures in edition 2024 2025-02-22 22:24:52 +00:00
Jason Newcomb
162fb713ac Allow SliceIndex to be indexed by ranges. 2025-02-21 16:10:31 -05:00
Lukas Markeffsky
3db930a463 assert that unexpectedly unsized fields are sized in the param env 2024-09-17 00:06:56 +02:00
Nicholas Nethercote
84ac80f192 Reformat use declarations.
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
Maybe Waffle
7d23b52376 const-ify some {IndexVec, IndexSlice} methods 2023-04-24 13:53:37 +00:00
Maybe Waffle
99ebfe2f15 move index code around 2023-04-24 13:53:37 +00:00
Maybe Waffle
e496fbec92 Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00