Files
rust/compiler/rustc_data_structures
Zalathar fd3b22a836 Use a safe BucketIndex abstraction in VecCache
The current code for indexing into bucket arrays is quite tricky and unsafe,
partly because it has to keep manually assuring the compiler that a bucket
index is always less than 21.

By encapsulating that knowledge in a 21-value enum, we can make the code
clearer and safer, without giving up performance.

Having a dedicated `BucketIndex` type could also help with further cleanups of
`VecCache` indexing.
2026-03-24 17:52:09 +11:00
..
2026-02-11 17:05:50 +09:00